Four people were killed on Friday when gunmen armed with hand grenades and a suicide vest stormed the Chinese consulate in the Pakistani city of Karachi, officials said.
Pakistani authorities said that security forces had secured the area after the attack, the latest assault on Chinese nationals in the country, where Beijing has poured billions of dollars into one of the largest projects in its massive Belt and Road programme.
China "strongly condemned" the attack and asked Pakistan to take measures to ensure the safety of Chinese citizens and institutions in the country, as well as the China-Pakistan Economic Corridor (CPEC) mega-project.
Three gunmen tried to enter the consulate in the southern port city, but were intercepted by guards at a checkpoint, Karachi police chief Ameer Sheikh told AFP.
"They were holding Kalashnikovs. First, they hurled a small (grenade) and then started firing," said Allah Bakhsh, a guard at a nearby house who witnessed the attack.
Police officials said two of their personnel were killed, along with a father and son from Quetta, the capital of Balochistan, who were seeking Chinese visas and were caught in the crossfire.
At least one of the attackers was wearing a suicide vest which did not detonate, another senior police official said.
Foreign Minister Shah Mehmood Qureshi told reporters in Islamabad that "all the terrorists have been eliminated", and that all 21 staff at the consulate during the attack had been taken to a safe location.