The slain governor of Punjab, Salmaan Taseer, was buried in Lahore this morning amid tight security as Pakistanis struggled to come to terms with a killing that exposed a vein of deep-rooted extremism that has infected even the senior security forces.

Taseer was shot 27 times yesterday by one of his own bodyguards, who was reportedly enraged by Taseer's opposition to Pakistan's draconian blasphemy laws.

Mourners crowded into the sweeping grounds of the colonial-era governor's residence in central Lahore for prayers before Taseer's body was flown by helicopter to a nearby graveyard. Taseer's three sons and a small crowd of mourners tossed rose petals over his coffin, watched by Punjab Rangers in fantail turbans who delivered a military salute.

A much larger crowd was prevented from entering the graveyard by soldiers and police amid fears of further violence by religious extremists.

A prominent group of Islamic scholars said that the funeral prayers should not be offered and warned that anyone who expressed grief for Taseer could suffer the same fate.

The Jamaat-e-Ahl-e-Sunnat Pakistan group represents scholars from the mainstream Barelvi sect of Sunni Muslims. Although considered moderate, they have led protests in favour of the blasphemy law.

"More than 500 scholars of the Jamaat-e-Ahl-e-Sunnat have advised Muslims not to offer the funeral prayers of Governor Punjab Salmaan Taseer, nor try to lead the prayers," the group said.

"Also, there should be no expression of grief or sympathy on the death of the governor, as those who support blasphemy of the prophet are themselves indulging in blasphemy."

A member of the Punjab Elite police force, Qadri yelled "Allahu Akbar" as he emptied two magazines of bullets into the outspoken politician. Photos taken after the shooting showed a calm-looking, curly-bearded man being driven away. In some images he was smiling.

Qadri, who surrendered immediately, said he killed the governor because of his support for reforms to Pakistan's draconian blasphemy laws, which were recently used to condemn a Christian woman to death.

The assassination has provoked the most intense soul-searching in Pakistan since the death of the former prime minister Benazir Bhutto in December 2007. "Punjab governor martyred" read the headline on the Daily Times, a left-leaning newspaper owned by Taseer.

For beleaguered liberals, the killing is a sign of growing intolerance and a further reduction of the already limited space for expression of progressive ideas. "If Pakistan and Pakistanis do not try to excise the cancer within, the future of this country is very bleak," said an editorial in Dawn.

The UN secretary general, Ban Ki-moon and the US secretary of state, Hillary Clinton, led international condemnation of the killing. Clinton, who met Taseer in Lahore last October, described his death as "a great loss".

Questions remain about whether Qadri acted alone or in concert with other fanatics.

Qadri told investigators he had been denied a job in the police special branch unit because of his extremist sympathies. He reportedly belong to Dawat I Islami, a non-violent religious group of the Barelvi sect.

Anger at Taseer's death among moderate Pakistanis was counterbalanced by the equivocation of powerful religious and media figures who, while condemning the killing, suggested that the governor was somehow responsible for his own death because he dared challenge the blasphemy laws.

Maulana Fazlur Rehman, the cleric who leads the JUI-F party, said Pakistan was "experiencing extremism on all sides", while some commentators described Taseer as a "liberal extremist". A Facebook page supporting Mumtaz Qadri, which had more than 1,000 supporters by Tuesday evening, has been taken down.

Several senior journalists said an examination was needed of the role of the media in providing a platform to fringe preachers and other extremists who had openly threatened Taseer and other progressives.

The attack has strong echoes of the 1984 assassination of the Indian prime minister Indira Gandhi, who was shot by two of her Sikh bodyguards as she walked to an interview with actor Peter Ustinov.

Taseer's death was triggered by his support for reform of the country's blasphemy laws, which date back to British rule in the 19th century but acquired a deadly edge under General Zia-ul-Haq in the 1980s, when blasphemy became a capital offence.

Taseer was one of a handful of politicians who publicly supported Aasia Bibi, a Christian mother of three who has been sentenced to death for allegedly insulting the prophet Muhammad during a row over a glass of water with her Muslim neighbours in a Punjabi village.

The law is frequently abused to persecute minorities or settle personal scores, yet has been staunchly defended by religious leaders who say it is integral to Pakistan's identity as an Islamic nation.

Taseer's assassination leaves Bibi, who is awaiting a court appeal in prison, in a perilous situation. Senior human rights campaigners said they feared she could be killed by zealots in jail or on the steps of the court, as has happened in other blasphemy cases.

Taseer was a staunch member of the ruling Pakistan People's party, which lost its parliamentary majority at the weekend. A wealthy businessman and long-time PPP supporter, he had been governor of Punjab, Pakistan's wealthiest and most populous province, since 2008.

He was known for his outspoken politics, sharp wit and sometimes brusque manner. He used Twitter to air views that other left-leaning politicians were reluctant to express publicly.

On 31 December he wrote: "I was under huge pressure 2 cow down b4 rightest pressure on blasphemy. Refused. Even if I'm the last man standing."