Follow us on Facebook, Twitter and Instagram to stay connected
Four gunmen drove up to the entrance gate of the Pakistan Stock Exchange around 10:00 am (05H00 GMT) then lobbed a grenade before opening fire with automatic weapons, officials said.
All four attackers were killed in an ensuing firefight as they attempted to storm the exchange, along with three security guards and a policeman, the Karachi police said in a statement.
In an email to AFP, the Balochistan Liberation Army (BLA) claimed responsibility and said the assault was not only targeting "Pakistan's economy" but was "an attack on Chinese economic interests in response to China's exploitative plans in Balochistan".
The BLA have long accused China of plundering Balochistan, the largest of Pakistan's four provinces that makes up the southwestern part of the country.
The separatists say Chinese-backed projects unfairly exploit the region's mineral and hydrocarbon resources.
Impoverished Pakistan has repeatedly turned to Beijing for investments and loans including under the $54-billion China-Pakistan Economic Corridor (CPEC) that Western critics say will be of greatest benefit to China in the long run.
The BLA have targeted infrastructure projects and Chinese workers in Pakistan multiple times in recent years, including an attack on Beijing's consulate in Karachi that killed four people in 2018.
In May last year, the BLA attacked a luxury hotel near Gwadar, where a deepwater port development is a CPEC flagship project.
The BLA is just one of several insurgent groups fighting primarily in Balochistan, which has been rocked by separatist, Islamist and sectarian violence for years.
Shot in the head
Pakistan's military praised the swift response of the city's security forces in Monday's attack, while the Karachi police released a video of one member of a provincial security unit describing the firefight.
"I shot one of them dead... The second guy saw me and... he took out a grenade. I shot him twice in his hand and his weapon fell down. I then shot him in the head as he tried to pull out the grenade pin," said Mohammad Rafiq, a member of an elite rapid response team.
The video of the officer was shared widely online, with social media users calling Rafiq a hero.
Last year, the US State Department designated the BLA as a global terrorist group, making it a crime for anyone in the United States to assist the militants and freezing any US assets they may have.
Read also: Crashed Pakistani jet's cockpit voice recorder found
Following Monday's attack, Pakistani authorities vowed to strike back against any group found responsible, promising to dismantle their networks and destroy their bases.
"An investigation has been launched and very soon we will reach their masterminds," Interior Minister Ijaz Ahmad Shah said in a video message.
The gunmen never made it into the stock exchange and business continued as usual after the attack.
"Trading is smooth and continuing. PSX benchmark index one of the Best Performer in Asia today so far," tweeted Mohammed Sohail, a broker at the exchange.
For a while after the attack the bodies of at least two gunmen could be seen in a pool of blood near the exchange's entrance.
The city's police had earlier said six people died in the firefight but later revised the figure. A Karachi hospital where the bodies were taken confirmed the new death toll.
Karachi was once a hotspot for crime and violence, with heavily armed groups linked to politicians frequently gunning down opponents and launching attacks on residential areas.
But the situation has largely stabilised in recent years following operations by security agencies against armed political outfits and Islamist militants.
Militant groups still retain the ability to launch periodic attacks in many rural areas and occasionally in urban centres.
Monday's attack comes more than a week after a grenade was thrown at a line of people waiting outside a government welfare office in the city, killing one and injuring eight others, municipal authorities said at the time.