Four gunmen attempted to storm the Pakistan Stock Exchange building but were killed by security forces, police have said.
The military said two other people were also dead following the attack on the building in Karachi, which houses the Pakistan State Bank and several national and international financial institutions.
Rizwan Ahmend, a police official at the scene, said that after opening fire, the gunmen entered the high walled stock exchange grounds.
They were reportedly armed with grenades and automatic rifles.
Mr Ahmend said food supplies were found on the bodies of the gunmen, indicating they may have planned a long siege, which police quickly thwarted.
Security forces were conducting a sweep for any remaining attackers, the military said.
“Four attackers have been killed, they had come in a silver Corolla car,” said Ghulam Nabi Memon, chief of police in Karachi, Pakistan's biggest city and its financial hub.
The gunmen initially threw a grenade at security men posted outside the stock exchange compound then opened fire on a security post, according to Reuters. The four were killed when security forces posted there responded.
Inside the stock exchange, broker Yaqub Memon said he and others were huddled inside their offices. There were no reports of any wounded among the brokers and employees inside the exchange.
Shazia Jehan, a police spokesman, said the bomb disposal squad had been called to the stock exchange building and were trying to clear the building of any explosive devises.
The Pakistan Stock Exchange, the country's largest and oldest stock exchange, did not suspend trading during the attack, its managing director, Furrukh Khan, said.
A counter-terrorism department official told Reuters the attackers were carrying significant quantities of ammunition and grenades in backpacks.
A separatist militant group from a neighbouring province later claimed responsibility for the attack.
The Baluchistan Liberation Army circulated to the media a photograph of four men in full body armour and camouflage outfits, saying they were the militants who attacked the stock exchange.
The group has been waging an urgency for years, demanding independence for Pakistan's gas-rich southwestern Baluchistan province, which borders the southern Sindh province, where Karachi is the provincial capital.
It has carried out a series of attacks in Karachi in recent years, including an attack on the Chinese Consulate in November 2018 that killed two people.
The Arabian Sea port of Gwadar is located in Baluchistan, and is part of China's multi-billion dollar one-road project linking south and Central Asia to China. The Baluchistan militant group has opposed the one-road project including a highway connecting the Gwadar port to the Chinese border.
Pakistan has long been plagued by Islamist militant violence but attacks have become less frequent in recent years after military operations against various factions in strongholds along the Afghan border.
Additional reporting by agencies