A procession of around two thousand Sunni Muslims marking the birthday of Islam's Prophet Mohammad entered the Ahmadi mosque despite resistance by police, hurling stones and bricks and firing weapons.
The Ahmadi minority holds that a prophet followed the Prophet Mohammed, who founded Islam. But that view runs counter to the Muslim religion's central belief that Mohammad was the last of God's messengers.
In 1974, a Pakistani law declared Ahmadis non-Muslims and in 1984, a new law made it possible to jail Ahmadis for "posing as a Muslim" or "offending a Muslim's feelings".
"Police tried its best to stop the attackers but failed because of slim deployment," Malik Nawaz, the police officer in charge of the Choa Saiden Shah area where the attack took place told Reuters.
"Later, high officials reached the spot with more troops and chased out the occupants."
He said police would register a case against the attackers after receiving a formal complaint from the Ahmadi community.
A spokesman for the Ahmadi sect said the mosque was built by the community in 1860 and has been in use since then.
The attackers likely attacked the mosque because they suspected the worshippers were breaking the law by commemorating the birthday of the prophet Mohammad.
"Today a mob attacked the worship place, threw stones and shot gunfire. Police could not stop them because of weak deployment," Saleemuddin, the Ahmadi community's Pakistan spokesman, told Reuters.
The attack comes just a week after Pakistan renamed a university centre for physicist Abdus Salam, its first Nobel laureate, after more than 30 years of all but disowning his achievements, as a member of the Ahmadi minority sect.
Salam, the first Muslim to win the prize for science, is buried in the Pakistani town of Rabwah, a major centre for Ahmadis, where his gravestone was defaced by local authorities who removed the word "Muslim" from an inscription that called him "the first Muslim Nobel laureate".
Ahmadis have repeatedly been targeted with violence by militant protesters and been taken to court on blasphemy charges.