Police in Pakistan say at least eight people were killed and 20 injured when gunmen opened fire as worshippers gathered for Friday prayers.
Pakistan's government has condemned the attack
The attack on members of the minority Ahmadiyya sect took place near the town of Mandi Bahauddin in Punjab.
The Ahmadiyya profess allegiance to Islam, but were declared heretical by a constitutional amendment 30 years ago.
Police official Mohammed Arif said the gunmen rode up on motorbikes before entering the mosque and opening fire.
"So far we only know that three men riding on a motorcycle suddenly came into the village [of Mong] on Friday morning. Two of them went inside the mosque and started firing," he told the Associated Press.
About 150 Ahmadiyya live in Mong, a suburb of Mandi Bahauddin, 150km (94 miles) south of Islamabad.
The head of the mosque, Sadiq Hussain Sherazi, was leading prayers when he heard gunfire and "immediately threw myself on the floor".
"The attackers thought I was dead and that is what saved me. After a while I got up and saw bodies all around me. There was blood and chaos all around and the wall was full of bullet holes."
Masood Ahmed Raja, a doctor belonging to the sect, said he saw three masked men escaping on a motorcycle.
"I had no idea who these men were, but when I reached the mosque, I heard cries and saw blood everywhere," he said.
"I don't know who attacked our mosque, but it seems to be an act of religious terrorism."
Interior Minister Aftab Sherpao said: "We condemn this attack. Any act of violence in which innocent people are killed should be condemned."
Shahbaz Bhatti, head of the All Pakistan Minorities Alliance, also condemned the killings, but said the government had failed to protect minorities.
Human rights groups have constantly highlighted the persecution suffered by the Ahmadiyya in Pakistan.
In August, authorities closed down the offices of 16 publications run by followers of the sect in Punjab city for "propagation of offensive material".
Bangladesh has also banned publications by the Ahmadiyya movement amid demands from Islamic hardliners that it be declared non-Muslim.
The Ahmadiyya were declared non-Muslims under the Pakistani constitution in 1974.
The sect was founded by Hadhrat Mirza Ghulam, who was born in the town of Qadian in Punjab in 1835.
The Ahmadiyya believe he was the Imam Mahdi, or the Promised Messiah.
Sectarian violence in Pakistan mostly concerns the rift between the majority Sunnis and minority Shia and has claimed around 4,000 lives in the past decade.