An Islamist militant group once allied with the United States and considered more moderate than the Taliban appeared to be behind a rush-hour suicide bombing in the Afghan capital Thursday morning that killed at least 15 people — two American troops, four civilian NATO contractors and nine Afghan civilians, including children walking to school.

It was the first major terrorist attack in Kabul since March, when Taliban suicide bombers struck a military convoy during a visit by newly appointed U.S. Defense Secretary Chuck Hagel, killing 14. The bombing Thursday made May the deadliest month this year for NATO forces, with 18 killed.

In Washington, a Pentagon spokesman confirmed that two U.S. service members had died in the attack, but the nationalities of the four dead NATO contractors have not been made public. Afghan police and health officials initially said that the blast, which left body parts strewn across a busy city street and shattered windows for many blocks, had killed seven people and injured 30. But by afternoon, the official toll had risen to 15 dead and up to 70 injured.

Two spokesmen for the militant group Hezb-i-Islami, alternately a rival and an ally of the Taliban, asserted responsibility for the attack. The group is led by Gulbuddin Hekmatyar, 65, a one-time anti-Soviet guerrilla leader, U.S. protege and Afghan prime minister who turned against the Kabul government a decade ago and launched a personal insurgency that boasts hundreds of fighters. Hekmatyar is now sought by the United States as a terrorist.

The spokesmen said the group had launched a “martyrdom squad,” or suicide cell, aimed at killing foreign forces and their Afghan employees in the final months of the NATO presence in the country. They also cited the recent news that the United States may keep up to nine military bases here after the drawdown is completed next year.

Haroon Zarghoun, one of the spokesmen, said in a telephone interview Thursday night that the attack was carried out because the U.S. administration is “not sincere about talks or solving Afghanistan’s problems.” He added: “We will step up jihad, and our first target will be American forces. We have a committee planning and choosing targets for more suicide attacks.”

It was the second terrorist attack in eight months claimed by Hezb, which carried out a suicide bombing in Kabul in September. In that incident, which Hezb spokesmen said was to protest a U.S.-made video mocking the prophet Muhammad, a female bomber rammed a bus carrying Afghan and foreign aviation workers to the Kabul airport, killing 15.

But analysts here and abroad described the continuing violence by Hezb militants as contradictory and out of character. The group is formally split into two factions, one of which is firmly embedded in the government of President Hamid Karzai and includes the ministers of education, agriculture and economy.

The second faction, based in the Afghan-Pakistani border region and reporting to Hekmatyar, is an armed insurgency but is considered more moderate than the Taliban. Its leaders, including Hekmatyar’s son-in-law, attempted repeatedly to build bridges with Karzai, sending numerous delegations to meet with Afghan officials. They were finally rebuffed in 2004 but are said to maintain a relationship with Kabul.

“They have been part of an insurgency for a long time, but never as strong or important as the Taliban,” said Thomas Ruttig of the Afghanistan Analysts Network, speaking from Berlin. “Our impression in recent months was that the two factions were having a kind of rapprochement and making overtures to the government. There are signs that they are not really split. I am a bit surprised if they hit this strongly after trying to get into talks.”

On Thursday afternoon, Karzai condemned the attack as the work of “terrorists and the enemies of Afghanistan’s peace.”

Witnesses described the aftermath of the bombing as a chaotic and frightening scene, with distraught parents begging Afghan police to search for their children amid the smoldering rubble. The blast, which left a huge crater in the street, could be heard for miles.

“I heard firing first. When I looked from the window, I heard a big explosion and saw smoke and flame rising from the cars on the road,” said Yar Mohammad, a police officer who was guarding a private bank next to the attack site and received minor injuries from flying glass. “It was very powerful explosion.”