At least 17 people have died and around 40 have been injured after a suicide bomber attacked Supreme Court staff in Kabul, local police said.
An email from Taliban spokesman Zabihullah Mujahid, claiming responsibility for the attack, read: "The bomber in a car struck and killed up to 50 ruthless prosecutors and other workers."
The Taliban routinely exaggerate details of their killings.
He went on: "The Islamic Emirate of Afghanistan (the name the Taliban took when they ruled the country) was obligated to act against this puppet regime because the people have suffered under the courts."
The attack comes only a day after seven insurgents, including suicide bombers, laid siege to Kabul's main airport for four hours.
And in April, Taliban gunmen killed 44 people in the main court compound in the western province of Farah. A Taliban spokesman said they had sent several warnings to court staff - whom they consider an arm of President Hamid Karzai's Western-backed government - telling them not to work there.
Kabul police spokesman Hashmat Stanekzai said the latest bomb hit three minibuses ferrying staff home, and that the attacker's car was parked on a road near the court compound and exploded when as they passed.
The Supreme Court is less than 500m from the entrance to the heavily fortified US embassy, with the Nato office also nearby.
Kabul resident Mira Jan, who was bleeding from a head wound, told Reuters: "We were sitting in a car when suddenly there was an explosion in the car behind me."
The attack came on the same day that the UN representative in Afghanistan, Jan Kubis, criticised the Taliban and other insurgent groups for being mostly to blame for the rise in civilian casualties in the first six months of the year.
The total of 3,092 civilians killed or wounded between January 1 and June 6 this year was 24 per cent higher than the same period last year, Kubis said.
President Hamid Karzai condemned the bombing, saying it was another "terrorist act that once again shows the Taliban are serving the enemies of Islam."
The Afghan authorities are fighting the insurgency with little or no help from international forces that have been in the country since 2001's US-led invasion.
All Nato combat missions will finish by the end of next year, and the 100,000 foreign troops deployed across Afghanistan have already begun to withdraw from the battlefield.
More than 11 years after the Taliban regime was ousted in 2001, efforts to seek a political settlement ending the violence have so far made little progress, but pressure is growing ahead of the 50-nation coalition's withdrawal.
The US provides the bulk of the military presence, with 68,000 troops, with the UK's 9,000 the second most.
As the withdrawal looms, there are tentative parallel efforts to encourage negotiations with the insurgency.
Kubis added that the UN in Afghanistan had publicly and privately sent a message to the Taliban that the mission was "willing to discuss civilian casualties and how to reduce them."
The Taliban, he said, had sent "signals of their willingness to discuss this," but that a way to establish contact with the group had not yet been worked out.