By Hamid Shalizi and Mirwais Harooni
KABUL, Dec 13 (Reuters) - The Afghan Taliban killed a Supreme Court official, a dozen mine clearers and several national and foreign soldiers but also suffered heavy losses from intensifying violence ahead of the withdrawal of most international troops in the next two weeks.
In Kabul on Saturday, a bomb ripped through a bus carrying soldiers in Kabul, killing at least six of them, mangling the vehicle and sending a column of black smoke over the capital.
"A suicide bomber on foot detonated his explosives at the door of a bus carrying army soldiers," said Hashmat Stanekzai, a spokesman for Kabul police chief.
Earlier gunmen shot dead senior Supreme Court official Atiqullah Raoufi as he left his home in the city.
The Taliban, ousted from power by U.S.-backed Afghan forces in 2001, claimed responsibility, but did not say why it had killed him. The hardline Islamist insurgents run their own courts in parts of the country and consider the official judiciary to be corrupt.
Heavily fortified Kabul has seen multiple attacks in recent weeks, including several on army buses and a suicide bomb that killed a German citizen in a French cultural center during a performance of a play that denounced suicide attacks.
Fatalities and injuries among Afghan security forces and civilians peaked this year to the highest point since the U.S.-led war began in 2001, as foreign forces rapidly withdrew most of their troops from the interior of mountainous nation.
About 5,000 Afghan police and soldiers have been killed, and more than 1,500 civilians were killed in the first half of the year. A rump of about 13,000 foreign soldiers will remain in Afghanistan next year, down from a peak of more than 130,000.
Fighting has extended long beyond the traditional summer season, with the Afghan government also inflicting heavy casualties on the Taliban. The army and police say they killed more than 50 militants nationwide in the past 48 hours.
The Taliban have been fighting a guerrilla war ever since their 5-year regime was toppled. They now have a strong presence in most of the provinces surrounding Kabul.
Just outside the city and close to the U.S.-run Bagram airfield, the Taliban detonated a roadside bomb on Friday night, hitting a convoy of foreign troops and killing two soldiers.
The blast left a 3 meter (10 feet)-long blackened fissure in the road, a Reuters witness said. Helicopters buzzed overhead on Saturday morning.
"Two International Security Assistance Force service members died as a result of an enemy forces attack in eastern Afghanistan on Dec. 12, 2014," a coalition press release said on Saturday.
The Bagram attack came two days after the United States closed a prison that held foreign detainees on the airfield, which is in Parwan province, the only province adjacent to the capital that is usually relatively peaceful.
It also followed a NATO air strike on Thursday that killed five people in the same province. Afghan officials said the casualties were civilians. The coalition said it was investigating the allegations, but that they were identified from the air as militants before the "precision" strike. (Additional reporting by Jessica Donati in Bagram and Mohammad Stanekzai in Lashkar Gah; Writing by Frank Jack Daniel; Editing by Toby Chopra)