KABUL, Afghanistan — With their wraparound sunglasses and easy smiles, the Nepalese contractors who guarded the Canadian Embassy had become respected fixtures in Kabul, part of a larger community of South Asian security guards who stood sentry at foreign missions all around the capital.

Driven to work in Afghanistan by collapsed economic prospects back home, the contractors were able to send desperately needed money back to their families. But nothing here is without risk.

Last week, a Taliban suicide bomber killed 15 men, 13 Nepalese and two Indian contractors who helped secure the embassy, striking the guards’ commuter bus just after it had picked them up at their residence compound. It was one of the deadliest attacks on foreign workers in the capital — and another example of how the South Asian contractors who have become mainstays in places like Afghanistan and Iraq are vulnerable in ways that many of their Western counterparts are not.

Many of the Nepalese guards had worked for months just to recover the thousands of dollars in broker fees they had paid to secure jobs in Afghanistan. One of the guards, Prem Bahadur Tamang, 38, said that they enjoyed fewer privileges in their barracks than their “white brothers.” He added that among other restrictions, for instance, they were prevented from leaving their compound to go to a store.