Pakistani authorities foiled an attack on the Chinese consulate in the city of Karachi yesterday, killing three gunmen, who tried to storm the consulate building, while killing two policemen and a security guard.

Pakistani authorities said the consulate staff was unhurt during the attack by the separatist Baluch Liberation Army (BLA).

Pakistani Prime Minister Imran Khan condemned the attack on the Chinese consulate and ordered immediate investigation.

The prime minister said the attack was an attack on Pakistan-China friendship and economic cooperation between the two countries.

He also praised the Pakistani security forces, which managed to thwart the attack, and "saved the country from a real disaster."

According to the Bloomberg News Agency, the prime minister said the attack on the Chinese diplomatic mission in Karachi was due to trade agreements concluded by the two countries earlier this month.

For his part, Pakistani Foreign Minister Shah Mahmood Qureshi said that all 21 Chinese consulate employees who were attacked were fine. "The attackers were not able to harm anyone, or to take hostages," he told a news conference in the capital, Islamabad, adding that all the staff had been moved to a safe place.

Separately, a suicide bomber blew himself up in a crowded market in Pakistan's remote northwestern region, killing 35 people and injuring more than 48 others, officials said.

Local official Hashem Khan said the bloody attack took place in the tribal district of Orkzai, one of the seven areas near the Afghan border, which was finally liberated from Taliban control.

The attacker walked to the entrance of an Islamic religious studies institute in the market and detonated his explosive vest.

More than 50 people were taken to hospital in the area, another official said. He said he feared the death toll would rise, as some of them were in serious condition.