Gunmen armed with grenades attacked the Pakistan Stock Exchange in the city of Karachi on Monday in a bid to take hostages, killing two guards and a policeman before security forces killed all four of the attackers, security officials said.
Separatist insurgents from the troubled southwestern province of Balochistan claimed responsibility, a senior counter-terrorism official, Raja Umar Khattab, told Reuters.
The Baloch Liberation Army (BLA) had claimed responsibility in a post on Twitter but Reuters was not able to verify the authenticity of the account. Spokesmen for the group were not available for comment.
"They had come to carry out an attack inside the building and take hostages inside," the director-general of the Sindh Rangers, a paramilitary force, Omer Ahmed Bukhari, told media, adding all attackers had been killed within eight minutes.
The police chief of Karachi, Pakistan's biggest city and financial hub, Ghulam Nabi Memon, told Reuters the gunmen attacked with grenades and guns after pulling up in a silver Corolla car.
Two guards and a policeman were killed and seven people were wounded, Deputy Inspector General of Police Sharjil Kharal told media.
A counter-terrorism official told Reuters the attackers were carrying significant quantities of ammunition and grenades in backpacks.
"We locked ourselves in our offices," said Asad Javed, who works at a brokerage in the stock exchange building, which is in a high security zone that also houses the head offices of several banks.
Javed said he was on the ground floor when he heard gunfire and an explosion and people scattered for safety.
Bukhari said that the attack could not have been carried out without the support of "hostile intelligence agencies" and India's Research and Analysis Wing (RAW) was one of their primary suspects.
"But at the moment we have to collect evidence to establish the supporters."
An aide to Pakistan's prime minister on national security matters, Moeed Yusuf, and the country's foreign minister, Shah Mahmood Qureshi, both said the attack was sponsored by hostile foreign elements.
Nuclear-armed foes India and Pakistan often trade accusations of being behind cross-border attacks. Pakistan has regularly blamed India for supporting Baloch separatists.
The BLA claimed responsibility in a brief message on a Twitter account set up shortly before the raid, describing it as a "self-sacrificing" attack carried out by its Majeed brigade.
The account was suspended a short time after the attack.
Separatists have been fighting for years in resource-rich Balochistan, complaining its gas and mineral wealth is unfairly exploited by Pakistan's richer, more powerful provinces.
The BLA's Majeed brigade also took responsibility for an attack on the Chinese consulate in Karachi in 2018. Several projects linked to China's Belt and Road initiative are in Balochistan.
This month, three explosions on the same day claimed by a little-known separatist group killed four people including two soldiers in the southern province of Sindh, of which Karachi is the capital.
The Pakistan Stock Exchange did not suspend trading during the attack. Its main KSE-100 index dropped 220 points briefly but later recovered and closed the day 242 points (0.7%) higher.
Islamist militants have also launched attacks in Karachi and elsewhere in Pakistan over the years but their violence has become less frequent after military operations against various factions in strongholds on the Afghan border.