KARACHI, Pakistan — In the most significant strike against Chinese interests in Pakistan in years, three militants assaulted the Chinese Consulate in the southern port city of Karachi on Friday morning, killing two policemen and two civilians at a checkpoint before being gunned down by the security forces.
On a day of violence that included a bombing that killed at least 30 people in northwestern Pakistan, the near-miss attack on the consulate in Karachi was a rare moment of upheaval for a tightening economic and strategic partnership between Pakistan and China.
A Twitter account associated with the Baluchistan Liberation Army, a separatist group in the sprawling and violent province of Baluchistan, said that three of its members had “embraced martyrdom” in an attack on the Chinese Consulate. And a spokesman for the group was quoted by Reuters as accusing China of “exploiting our resources.”
Pakistan has been a showcase for China’s huge international development program, the Belt and Road Initiative, in recent years. China is estimated to have spent some $62 billion on those projects in Pakistan, mostly to build a transportation corridor through Baluchistan to a new, Chinese-operated deepwater port in the Pakistani town of Gwadar.
The road corridor being built through Baluchistan, which is also rich in natural resources, is one of the most strategic projects associated with the Belt and Road Initiative. Its stated purpose is to greatly reduce shipping costs and time for Chinese goods, but it would also give China an important alternative if faced with naval blockades by the United States or its Asian allies.
Baluchistan has also been the center of two resilient insurgencies, making it one of the most sensitive areas for Pakistan’s powerful military establishment: Ethnic Baluch separatists there have been pursued by a stifling Pakistani security presence, and part of the leadership of the Afghan Taliban also continues to take shelter there, in the city of Quetta.
In a video sent to an Indian news service in March, Aslam Baloch, a senior commander of the Baluchistan Liberation Army, accused China and Pakistan of plundering resources in Baluchistan, which his group wants to turn into an independent state.
An ambulance brought the body of one of the Karachi attackers to a hospital. The Baluchistan Liberation Army claimed responsibility for the assault.CreditSaiyna Bashir for The New York Times
Foreign Minister Shah Mehmood Qureshi told Pakistan’s National Assembly that the first attacker at the consulate on Friday detonated an explosive vest, while the other two opened fire and tried to rush toward the area where visas are issued.
Amir Jan, a driver who had been washing his car near the consulate, said he saw three men with Kalashnikov assault rifles move toward the consulate around 9:15 a.m. He said one threw a grenade before they all opened fire.
Officials later said that two Pakistani civilians, a father and son who had come from Quetta to get Chinese visas, were also killed in the attack.
Prime Minister Imran Khan issued a statement on Twitter insisting that such attacks could not shake the relationship between China and Pakistan. He said the strike had clearly been intended “to scare Chinese investors” and came as a result of trade agreements announced during his trip to China this month.
The Chinese Embassy in Islamabad, the capital, later issued a statement extending condolences over the deaths and expressing faith in Pakistani security. “We believe that the Pakistani side is able to ensure the safety of Chinese institutions and personnel in Pakistan,” the statement said, adding that any attempt to undermine the countries’ relationship was “doomed to fail.”
After the attack in Karachi, another bombing — this one in the Orakzai region of northwestern Pakistan — showed the continuing threat posed by militants on a separate front.
At least 30 people were killed and 40 or more wounded when a bomb blast ripped through a fruit and vegetable market in the Hangu district there, officials said. The market was near a seminary for Shiite Muslims, a minority in Pakistan that is frequently targeted by extremist Sunni groups. But the dead included a mix of Pakistanis.
“The dead include Sunnis, Shiites and a couple of Sikh community members,” said a local official, Mutahir Zeb Khan. “We are identifying the dead.”
There was no immediate claim of responsibility for the bombing, which ended a brief lull in violence in the restive northwestern region, where the Pakistani Taliban were once active.
Mr. Khan, the prime minister, implicitly linked the two attacks Friday, saying they represented “a planned campaign to create unrest in the country by those who do not want Pakistan to prosper.”
Karachi, home to 15 million people, is Pakistan’s largest city and its economic powerhouse. The neighborhood where the consulate attack happened, near the Arabian Sea, is mostly residential and upscale, including other consulates, schools and restaurants.
The gunfire could be heard from several miles away, and witnesses on social media posted photos of smoke rising into the air as the attack unfolded. Schools in the area were placed on lockdown.
Pakistan has tightened its economic ties to China in recent years, with Beijing recently giving Pakistan a $2 billion loan to help shore up its finances. That followed $1 billion received from Chinese banks in April. But even that substantial aid is far outstripped by the scale of Belt and Road spending in Pakistan.
The investment in Pakistan led to an increase in the number of Chinese citizens in the country, and concern grew for the foreigners’ safety. In 2017, two Chinese citizens were abducted and killed in Quetta, in Baluchistan. The Islamic State claimed credit for that attack.
The Baluchistan Liberation Army claimed responsibility for an attack in August on a bus carrying Chinese mining workers in southwestern Pakistan, near the country’s borders with Afghanistan and Iran. The suicide bomber died and the workers were slightly injured.
China is also starting to come under scrutiny from some public figures in Pakistan for its treatment of ethnic Uighur Muslims in China’s Xinjiang region.