KARACHI, Pakistan — Four gunmen armed with assault rifles and grenades stormed the stock exchange in Pakistan's commercial capital, Karachi, on Monday, but security officials said the attack was foiled within minutes.

Police said one police officer and two private security guards who stopped the gunmen died. All four attackers were killed before they could enter the country’s oldest and largest stock exchange.

A separatist militant group called the Baluchistan Liberation Army claimed responsibility for the attack in a tweet from an account that was later suspended by Twitter. The claim of responsibility could not be confirmed, but the group has carried out a number of similar attacks in recent years aimed at destabilizing Pakistan’s economy and undermining Chinese influence.

Pakistani officials blamed India for the attack, claiming ties between New Delhi and the militant group. 

“Make no mistake, today’s attack in Karachi is state-sponsored terrorism against Pakistan,” said Pakistani national security adviser Moeed Yusuf.

The local commander of the Pakistan Rangers, a federal paramilitary group, said the attackers were killed in eight minutes. Maj. Gen. Omer Ahmed Bukhari told reporters at a news conference such attacks cannot take place without the aid of “outside intelligence agencies,” according to the Pakistani newspaper Dawn.

“Police and security guards engaged the attackers outside the building, and they couldn’t get into the building. The blood spots are of our injured police and guards,” Sharjeel Kharl, police deputy inspector general, told reporters at the site.

In a statement, police added that seven people were injured, including three police officers, two security guards, a stock exchange employee and one other person.

In a tweet, the stock exchange said, “The market continued to operate normally during the incident,” adding that an attack on Pakistan’s stock exchange “means an attack on Pakistan’s Economy.”

Police official Rizwan Ahmend told the Associated Press that food supplies were found on the bodies of the gunmen, suggesting they had planned a long siege.

Television footage of the scene showed authorities displaying grenades and ammunition recovered from the attackers.

The suspended Twitter account, called the “Majeed brigade of the Baloch Liberation Army,” said its fighters “carried out a self sacrificing attack on Karachi Stock Exchange.”

Last year, Baluchistan Liberation Army gunmen stormed a luxury hotel in the southern Pakistani port city of Gwadar, killing a guard during an hours-long gun battle with security forces. And in 2018 the group attacked the Chinese Consulate in Karachi.

The Baluchistan Liberation Army is one of the oldest of the groups fighting for an independent Baluchistan, accusing the central government of exploiting the resources of the vast remote province. The U.S. State Department named it a terrorist group in 2019.

Pakistan has long struggled with attacks from radical Islamist militants, but violence has declined in recent years.

Shaiq Hussain in Islamabad, Pakistan, and Paul Schemm in Dubai contributed to this report.