Gunmen on Wednesday stormed a mosque in Somalia's central town of Galkayo and shot dead five Pakistani Muslim clerics after dawn prayers, officials and witnesses said.
They dragged the preachers out of the mosque and opened fire on them, said a police official in the town straddling Somalia's self-declared state of Puntland and Somalia proper.
"The five were from Pakistan," the officer, who spoke on condition of anonymity, told the news agency AFP.
Authorities had launched a manhunt for the killers, he added.
It was uncler why the men, who arrived in Galkayo on Tuesday, were targeted.
Speaking to reporters, Puntland's president Abdurahman Mohamed Farole condemned the killing as a "terrible incident. We are still investigating who was behind it".
The preachers belonged to a Muslim sect known as Tabliq, said Sheikh Mohamed Abdi Said, the spokesman of the Ahlu Sunna religious group which controls the area.
He said the sect "has never advocated violence" and termed their killing as "contrary to the teaching of Islam."
The Ahlu Sunna group rose to the limelight in late 2008 when they fought the radical Shebab militia, accusing them of fostering violence across Somalia.
It also blamed the Shebab of killing religious scholars, elders, traders and other opponents, labelling their victims "enemies of Islam".
But the Shebab also condemned Wednesday's murders.
"It is the worst thing in Somalia's history because killing of religious men is unknown among the Somali commuity," Shebab spokesman Sheikh Ali Mohamoud Dhere told reporters in Mogadishu.
"This attack was carried out by anti-Islamic elements."
Although Puntland has been spared much of the violence which has wracked other regions of the Horn of Africa state in the past 18 years, tensions have been on the rise lately.
Last week, Puntland's information minister was killed by unknown attackers in Galkayo. The region is also a major hub for piracy that has turned the Gulf of Aden into the world's most dangerous waterway.
A spokesman for the Pakistani embassy in neighbouring Kenya said officials were still trying to determine the total number of casualties in the attack.
"I can confirm we are getting reports of Pakistanis killed in Galkayo, in Puntland," the spokesman said.
"But we are still investigating. I cannot confirm exactly what happened. Yes this incident has taken place but we are not sure of the total number of casualties."
Galkayo residents said tension remained high in the town.
"Everybody in the town is worried and nobody knows who carried out this crude act," said Abdukadir Mohamed. "The town is too tense."
Local elder Mohamoud Adan Hussein said they had set up a committee to probe the assassinations and hunt down the gunmen.
"Those people were innocent and killing them is the worst sin," he told AFP.
The bodies of the victims were placed in the mosque and talks were under way to determine where they should eventually be burried.
Puntland, which declared its semi-autonomous status in 1998, has also seen the abduction of journalists and other foreigners later freed upon payment of ransom.
A report by the International Crisis Group released on Wednesday warned that if its government does not react and reach out to all of the semi-autonomous region's clans, "Puntland may break up violently, adding to the chaos in Somalia."
It said Puntland needed to return to "its original consensual style of politics. This requires reforming the electoral system, restarting the constitutional drafting process, tackling corruption and rebuilding clan trust."