The US has instructed all non-essential diplomatic staff in the Pakistan city of Lahore to leave the country over a "credible threat".

The US State Department said the decision to pull its staff from the diplomatic facility was a precautionary measure.

Some reports suggest the latest withdrawal is a local issue, unrelated to the closure of US diplomatic posts across the Muslim world on 4 August.

"We are undertaking this drawdown due to concerns about credible threat information specific to the US consulate in Lahore. An updated travel warning has also been issued," said the State Department.

"US citizens remaining in Lahore... should limit non-essential travel within the country, be aware of their surroundings whether in their residences or moving about, [and] make their own contingency emergency plans.".

The travel warning issued by the American authorities said, "The presence of several foreign and indigenous terrorist groups poses a potential danger to US citizens throughout Pakistan."

It is also unclear when the diplomatic facility in Lahore, located near the border with India, will reopen.

Tensions are running high along the India-Pakistan border over the killing of soldiers, and Washington's move has come just hours after a suicide attack in the southwestern Pakistan city of Quetta, which killed 30 police officers and injured dozens of others.

"So far we can confirm 21 police personnel, including senior police officials, have been killed. Nine other victims are yet to be identified. I can confirm 40 people have been injured. The death toll may rise because the condition of most of the injured is critical," senior police official Mushtaq Sukhera told reporters.