An attack on a Sunni Muslim mosque in the southwestern Pakistani city of Quetta has left at least 10 people dead and another 30 wounded, just one day after a suicide bomber killed at least 37 people in the same city.

Friday's attack in the capital of Balochistan province came as most Pakistanis celebrated Eid al-Fitr, and was followed by another blast in Islamabad which saw a guard shoot dead a would-be suicide bomber forcing his way into a mosque.

"Four gunmen opened fire when people were coming out of the mosque after saying Eid prayers," Bashir Ahmad Brohi, a senior local police official in Quetta, told AFP news agency.

Brohi said a former Pakistan Peoples Party provincial minister, Ali Madad Jatak, was in the mosque and could have been the target.

"But we are not sure at the moment and are investigating, " he said, adding that Jatak escaped unhurt although bullets hit his car.

Only hours earlier Nawaz Sharif, the Pakistan prime minister, ordered security increased across the country for the duration of Eid.

The violence in Quetta comes amid an alert issued by the US government ordering all non-essential staff to leave its consulate in Lahore after it received threats of attack, with the State Department also warning US citizens not to travel to the country.

The announcement is the latest in a wider warning which has affected other, mostly Muslim-majority, countries.

"The security situation in Pakistan is extremely tense," Al Jazeera's Imtiaz Tyab reported from Islamabad.

"The threat here is frankly quite high [but] the US State Department hasn't clarified exactly what those threats are."

Police funeral bombing

Thursday's bombing in Quetta claimed the lives of several senior police officers who had been at the funeral of a fellow officer.

Among the dead were Fayyaz Sumbal, a deputy inspector-general, and Shamsuddin, deputy superintendent of police headquarters.

Thursday's bombing in Quetta killed several senior police officers who were at a colleague's funeral

Fifty people were also wounded in the attack, including children attending the funeral.

The suicide bomber was wearing a jacked packed with ball bearings and shrapnel, a member of the bomb squad said.

According to television reports, the bomb exploded outside a mosque where the funeral of Mohibullah, a station house officer, was being held.

Mohammad Hafiz, a policeman, spoke of his horror after the explosion.

"I was inside the mosque and we were lining up for the funeral prayers when a big blast took place," he said.

"I came out and saw injured and dead bodies lying on the ground. "I have no words to explain what I've seen. It was horrible."

The blasts in Quetta come at the end of a month during which at least 11 attacks have killed more than 90 people across Pakistan.

It is not not clear who is responsible for the attacks.