Armed attackers attempted to storm the Chinese consulate in the Pakistani city of Karachi Friday morning local time, killing four people, authorities said.
Gunshots were heard at about 09:30 local time (04:30 GMT) outside the consulate in the upmarket Clifton area. Police shot dead three attackers.
Separatist militants who oppose Chinese investment projects in western Pakistan say they carried out the attack.
In another incident on Friday, at least 20 people were killed in a bomb attack in north-west Pakistan.
The blast occurred in a mostly Shia neighbourhood in Orakzai district. Police say a suicide bomber on a motorbike drove into a crowded marketplace.
Pakistan’s Shia minority has often been targeted by Sunni extremists.
Three gunmen tried to enter the consulate but were stopped by security guards at a checkpoint, reports said. Two of those killed in the attack were police officers.
Eyewitnesses reported seeing a blast, and local TV channels broadcast images of a plume of smoke. There is a heavy police presence in the area which has been cordoned off.
All the staff inside the consulate are safe, China said. The Foreign Ministry in Beijing called for extra measures to protect Chinese citizens in Pakistan.
“At the same time we mourn the deaths of the Pakistani police and think of their families at this time,” a spokesman said.
The Baloch Liberation Army, a separatist group, claimed responsibility for the attack in a tweet including a photo of three unidentified men and the message: “Karachi: Fidayeen of BLA attacked the Chinese embassy in Karachi.”
In a statement released after the attack, the group said its objectives were “clear — we will not tolerate any Chinese military expansionist endeavors on Baloch soil.”
“We have been seeing the Chinese as an oppressor, along with Pakistani forces,” a spokesman for the group told the AFP news agency.
Over the years construction projects and Chinese workers in Balochistan have been repeatedly targeted by militants but this is one of the most prominent such attacks to date.
Balochistan is at the heart of an ambitious Chinese project, the China Pakistan Economic Corridor (CPEC), which is a string of huge investments by China in Pakistani infrastructure seeking to link its western Xinjiang province with the Arabian Sea port of Gwadar in Balochistasn.
As China is such a close ally to Pakistan and has poured billions into the nation, this incident will deeply concern authorities who have described this investment as a “game changer”, says the BBC’s Secunder Kermani in Islamabad.
Balochistan itself is a sparsely populated region, rich in gas and coal reserves, as well as copper and gold.
Yet it has remained Pakistan’s most impoverished area and Baloch nationalists have long accused the central government of exploitation and denying the province its due rights.