Afghan police inspect the site of a suicide attack Monday that hit buses carrying foreign security guards in Kabul. (Shah Marai/AFP via Getty Images)

A suicide bomber killed 14 Nepali and Indian security guards in the Afghan capital on Monday in one of the deadliest attacks on foreign contractors since the war here began nearly 15 years ago.

The attack occurred as two buses transporting the guards — all assigned to security details at the Canadian Embassy — pulled out of a housing compound in the eastern part of Kabul. A suicide bomber approached on foot and blew himself up next to one of the buses.

The attack also wounded nine people, according to the Afghan Interior Ministry.

[A young man is skinned alive. A sign of new Taliban brutality?]

In a statement, the Taliban insurgency asserted responsibility for the attack, saying it was aimed at “forces of aggression.” But the Islamic State militant group also issued a statement claiming responsibility, according to the SITE Intelligence Group, which monitors militant activity.

A Nepalese security guard victim receives treatment at a hospital after a suicide attack in Kabul. (Rahmat Gul/AP)

Canadian Prime Minister Justin Trudeau condemned the attack, saying in a statement on Twitter: “Today’s attack on security workers in Kabul is appalling & cowardly. Our thoughts are with the victims as we stand with the Afghan people.”

The attack shattered two months of relative calm in Kabul, but a spate of similar bombings has occurred across Afghanistan since a U.S. drone strike killed Taliban leader Akhtar Mohammad Mansour about a month ago.

[Afghan president puts aside peace bids and vows harsher fight against Taliban]

The guards provided security for Western embassies and firms in Kabul, Afghan officials said.

Kamal Thapa, Nepal’s foreign minister, condemned what he called “a heinous crime against innocent people.”

Many contractors who work for Western or large Afghan organizations live in camps on the outskirts of Kabul and are shuttled to work downtown in buses.

Because of a lack of parking and public transportation downtown, Afghan government workers also rely on shuttle buses.

Over the years, the Taliban has stepped up attacks on those buses, many of which have no armed protection.

A Taliban suicide bomber in April attacked a bus carrying government workers on the outskirts of Kabul, killing 11 of them. In January, a similar attack aimed at Afghanistan’s leading news channel, Tolo, killed seven media workers.

Thousands of Nepalis are thought to be working in Afghanistan, many for large security firms or embassies.

Read more:

U.S. widens war in Afghanistan, authorizes new action against Taliban

Afghanistan paid 11,000 militants to lay down arms. Now the money has run out.

Afghanistan hangs 6 Taliban inmates in face of increasing violence

Today's coverage from Post correspondents around the world