Two policemen were killed on Friday when gunmen stormed the Chinese consulate in the Pakistani city of Karachi, officials said, while hours later a market was also targetted in the northwest, killing at least 12 people.

Pakistani authorities said that security forces had secured the area around the consulate after the attack, the latest in a series of assaults on Chinese nationals, including workers involved in a multi-billion dollar infrastructure project in the country.

Multiple gunmen tried to enter the consulate in the southern port city, but were intercepted by guards at a checkpoint, senior local police official Javaid Alam Odho told AFP.

Pakistani security personnel move in the compound of Chinese Consulate. Photo / AP
Pakistani security personnel move in the compound of Chinese Consulate. Photo / AP

An exchange of fire resulted in the "killing two of our constables and critically wounding another", he said, adding that at least one attacker had been wearing a suicide vest which did not detonate.

Advertisement

Foreign Minister Shah Mehmood Qureshi told reporters in Islamabad that "all the terrorists have been eliminated".

"Terrorists attempted to enter Chinese consulate. Rangers and police have got control. Three terrorists killed. All Chinese safe. Situation under control," the military's media wing said in a statement.

The attack was claimed by a separatist militant group from Pakistan's southwestern province of Balochistan, which is at the centre of a major Chinese investment project in the country.

Meanwhile, Pakistani police say a powerful bomb at an open-air food market in the country's northwest has killed at least 12 people, an attack just hours after armed separatists stormed the Chinese Consulate in the southern port city of Karachi.

Local police official Tahir Ali says the market attack took place in the town of Klaya, in the Orakzai region of the Khyber Pukhtunkhwa province, which borders Afghanistan.

He said most of the victims were minority Shiite Muslims. More than 50 were wounded in the attack, some critically, triggering fears the death toll could rise further, Ali says the tragedy has prompted local authorities to declare an emergency at the region's hospitals to handle the situation.

Orakzai has been the scene of militant attacks in recent years, mostly claimed by Pakistani Sunni militants.

Pakistan's Prime Minister Imran Khan "strongly condemned" the attack on the Chinese Consulate.

Advertisement

Khan issued a statement, saying he has ordered a probe into Friday's attack. He described the assault as part of a conspiracy against Pakistan and China's economic and strategic cooperation.

Khan vowed in his statement that such incidents would never be able to undermine Pakistan's relations with China, which are "mightier than the Himalayas and deeper than the Arabian Sea."

Khan lauded the Karachi police and the paramilitary ranger forces, saying they showed exceptional courage in defending the consulate and that the "nation salutes the martyrs."