An injured boy is taken to a hospital in Quetta following the attack on the mosque.

An injured boy is taken to a hospital in Quetta following the attack on the mosque. Photo: AFP

Pakistan's troubled south-western city of Quetta, focus of a surge in sectarian bloodshed, was hit by its second attack in two days as gunmen shot dead at least nine people outside a mosque on Friday.

The worshippers were gunned down as they left prayers for Eid al-Fitr, the festival marking the end of the Islamic holy month of Ramadan, which was marred in Pakistan this year by at least 11 attacks that killed 120 people.

On Thursday a suicide bomber struck at a police funeral in the city, killing 38 people. The dead included nearly half the top police commanders in Baluchistan province who were attending the funeral of a police inspector killed earlier.

The attack, claimed by the Taliban, will raise yet more concerns about the violence that has continued unabated since the newly-elected government took office.

The move came as the US evacuated all non-emergency staff from its consulate in Lahore, citing "specific threats" amid a worldwide alert over al-Qaeda intercepts.

The closure of the US consulate in Pakistan's second-largest city and cultural capital came amid heightened security measures in Islamabad, where police and soldiers were maintaining a highly visible presence on the streets.

The US State Department also reiterated a longstanding warning to US citizens to avoid all non-essential travel to Pakistan.

"On August 8, 2013, the Department of State ordered the departure of non-emergency US government personnel from the US Consulate General in Lahore, Pakistan," the State Department statement said.

"The Department of State ordered this drawdown due to specific threats concerning the US Consulate in Lahore."

Meghan Gregoris, spokeswoman for the US embassy in Islamabad, said the evacuation was not linked to a terrorist threat that prompted the closure of 19 diplomatic missions in the Middle East and Africa.

"We received information regarding a threat to our consulate in Lahore. As a precautionary measure we have undertaken a drawdown for all but emergency personnel in Lahore," she told AFP.

The US embassy and consulates in Karachi and Peshawar were closed on Friday for the Eid public holiday, but are expected to open again on Monday, she said. The Lahore mission was likely to remain closed and there was currently "no indication" of when it might reopen.

"We will continue to evaluate threat reporting and take decisions as appropriate," she said.

Despite Pakistan's fractious alliance with the United States in the "war on terror", anti-American sentiment runs deep in the restive, nuclear-armed country, fuelled in part by the CIA's campaign of drone strikes against militants in the tribal northwest.

Washington maintains the strikes are an important and effective weapon in the fight against Taliban and al-Qaeda extremists, but Pakistan denounces them publicly as a violation of sovereignty.

US diplomatic missions have been the target of violence in the past.

A suicide car bomber rammed a US diplomatic vehicle in the north-western city of Peshawar last September, killing two people – at least the third time the mission and its staff had been attacked by Taliban and Al-Qaeda-linked militants since April 2010.

AFP