— The Islamic State has asserted responsibility for an attack that killed 43 Shiite Muslims in Pakistan’s largest city on Wednesday, raising wider concerns about the Sunni militant group’s reach in South Asia.

According to police, at least five men armed with 9mm pistols stormed a bus carrying Ismaili Muslims in Karachi, a port city in southern Sindh province. The gunmen began shooting the passengers, including women and children, at point-blank range.

The attack, which also wounded 13 people, renewed attention on Pakistan’s apparent inability to ensure the safety of its religious minorities.

A group that calls itself the Khorasan Province and pledges loyalty to the Islamic State said it was responsible for the assault, according to the SITE Intelligence Group, which monitors militant Web sites and other forums. It marks the first time that an Islamic State-affiliated group has claimed direct links to bloodshed in Pakistan.

Several witnesses said the attackers left behind letters. At least one of the letters made references to the Islamic State, according to a police official, who spoke on the condition of anonymity because he was not authorized to publicly discuss the attack. The letter also threatened more strikes against Shiites, whom Sunni extremist groups consider heretics.

Gunmen on motorbikes in Karachi Wednesday opened fire on a bus, killing at least 43 people. An offshoot of the Pakistani Taliban claimed to have carried out the attack (Reuters)

Meanwhile, in a statement ­e-mailed to reporters, a Taliban splinter group asserted responsibly for the attack. The group, Jundullah, announced last year that it was aligning with the Islamic State.

But it remained unclear Wednesday whether the attack was carried out by sympathizers of the Islamic State acting independently or whether it was part of a broader effort by the group to extend its reach in Pakistan.

Late last year, the Islamic State named Abdul Rahim Muslim Dost the commander of its operations in Pakistan and Afghanistan.

Dost, a writer thought to be in his 50s, had spent three years in the U.S. military prison at Guantanamo Bay, Cuba, on suspicion of links to al-Qaeda but was released in 2005 after he complained of health problems. In recent weeks, U.S. officials have said that Dost had traveled to Karachi but that they did not suspect him of involvement in Islamic State operations.

Pakistani security officials have noted that Dost is wanted for spreading Islamic State propaganda but expressed doubt about his ability to carry out major attacks.

“He is good at jihadi lectures and preaching, so he could be instrumental in recruitment for [the Islamic State], but I don’t think he is good at planning or staging attacks,” one Pakistani intelligence official, who spoke on the condition of anonymity because he was not authorized to talk to the media, said recently.

But Wednesday’s attack is rattling Pakistani leaders.

People light candles to protest and show solidarity with the victims of a bus attack in Karachi, Pakistan, Wednesday. (Shakil Adil/AP)

“We will take strong action against those involved in this heinous act of terror,” Qaim Ali Shah, chief minister of Sindh province, said in an interview with Pakistan’s GEO TV. “The Ismaili community is a very peaceful community, and they have no disputes with anyone.”

Ismaili Muslims consider the Aga Khan family their spiritual leader, viewing its members as direct descendants of the prophet Muhammad’s son-in-law. Prince Karim Aga Khan IV, a billionaire philanthropist, is the current spiritual leader of the Ismailis. They are widely viewed as among the most progressive and educated residents of Pakistan and have been integral members of Karachi’s business community.

Pakistan’s army chief, Gen. Raheel Sharif, canceled a three-day visit to Sri Lanka to personally oversee the situation. In a statement, U.S. Ambassador Richard G. Olson offered American assistance to track down the attackers.

Pakistan has struggled for decades with sectarian violence, but authorities have rarely arrested and successfully prosecuted those involved. After a lull last year, the number of attacks on Shiites in Pakistan is again increasing, according to the South Asia Terrorism Portal, which tracks violence in the country.

The group notes that nearly half of the 226 civilians killed in terrorist attacks in the first two months of 2015 were Shiites. The worst of those attacks occurred in late January when a suicide bomber killed about 60 people at a Shiite mosque in Sindh.

Two weeks later, four suicide bombers killed 19 people at a Shiite mosque in Peshawar, the capital of Pakistan’s northwestern Khyber Pakhtunkhwa province.

About three-fourths of Pakistanis are Sunnis, while Shiites make up 15 percent to 20 percent of the population.

Last month, the U.S. Commission on International Religious Freedom released a report noting that Pakistani militant groups have been killing Shiites with “impunity.”

“Police, if present, have failed to stop attackers before people are killed, and the government has not cracked on the groups that repeatedly targeted Shia Muslims,” the report stated, adding that Lashkar-e-Jhangvi, a banned militant group, is responsible for much of the violence.

But Karachi residents have been complaining for months about an increase in pro-Islamic State graffiti.

Last month, gunmen critically wounded an American teacher in Karachi as she was driving.

Those attackers also left a letter at the scene claiming allegiance to the Islamic State. Authorities are investigating the claims but say they do not think the Islamic State poses a serious threat to Pakistan’s security.

In neighboring Afghanistan, however, both President Ashraf Ghani and Gen. John F. Campbell, commander of coalition forces, have said that they are worried that some militants previously affiliated with the Taliban are now trying to regroup as part of the Islamic State movement.

“We are watching it very closely and taking it very seriously,” said Brig. Gen. Wilson A. Shoffner, a spokesman for the U.S.-led coalition in Afghanistan. “We have seen some changes in allegiances among those who used to call themselves members of the Taliban.”

Craig reported from Kabul. Nisar Mehdi in Karachi, Aamir Iqbal in Peshawar and Adam Goldman in Washington contributed to this report.

Read more:

Touring ‘the world’s most dangerous megacity’ — on an armed and colorful bus

Karachi residents live in fear as Pakistani Taliban gains strength

Pakistanis face a deadline: Surrender fingerprints or give up cellphone

Today's coverage from Post correspondents around the world