An Afghan soldier stands guard Saturday at the site of a suicide attack in Kabul. (Rahmat Gul/AP)

Multiple attacks killed at least 21 people, including two American soldiers and a senior officer of the nation’s highest court, Afghan and U.S. officials said Saturday.

The attacks were the latest in a spate of assaults that have sparked new security concerns and put Afghans and foreigners on edge, as most U.S. and international troops prepare to leave in less than three weeks.

The Americans were killed Friday in a bombing of a convoy near Bagram military base, north of Kabul, the capital. The fatalities were initially reported as two NATO service members, but a U.S. defense official in Washington confirmed that the two were Americans, according to Reuters.

On Saturday, Atiqullah Raufi, the head of the Supreme Court’s secretariat, died after gunmen on a motorcycle opened fire as he left his house in the Afghan capital for work Saturday morning, killing him instantly, said Kabul police spokesman Hashmat Stanikzai.

The Taliban Islamist insurgency asserted responsibility for both attacks.

Late Saturday afternoon, gunmen — again on motorbikes — fatally shot 12 workers clearing unexploded mines in the volatile southern province of Helmand. The carnage unfolded near Camp Bastion, a former British base that was handed over to Afghan control in October. Afghan forces later clashed with the gunmen, killing three and arresting four, said Omer Zowak, a spokesman for the provincial governor’s office. No group has asserted responsibility for that massacre.

The death toll rose again when a suicide bomber blew himself up next to a bus carrying Afghan soldiers in Kabul, killing six people and wounding more than 10, including a young girl, said Stanikzai, the Kabul police spokesman.

“I heard a huge explosion,” said Najibullah Wardak 45, a mechanic who witnessed the bombing. “The army bus, which was a few yard away, got on fire. I saw army officers jumping from the windows.”

Saturday’s bloodshed came two days after a teenage suicide bomber sneaked past security guards at an elite French-run school in Kabul and blew himself up in the middle of an audience watching a play about nonviolence and democracy. One person, a German citizen, was killed, and more than 20 were injured. Earlier that day, a suicide bomber targeted another bus carrying Afghan soldiers, killing six and wounding 14.

Other attacks in recent weeks have killed a foreign aid worker and his two teenage children, a British Embassy worker and two American soldiers. The Taliban tried to assassinate Kabul’s former police chief and an outspoken women’s rights activist, and its fighters have stormed compounds inhabited by foreign contractors.

The barrage of violence has led many foreigners and affluent Afghans to temporarily leave the country or make exit plans.

“What is going on in this country?” Wardak asked. “No one is safe anymore. The Taliban are targeting schools, playgrounds, mosques, roads. I do not know what will happen to this country."

Mohammad Sharif in Faizabad contributed to this report.