Gunmen shot dead two Afghan women judges working for the Supreme Court in an ambush in the country's capital Sunday, officials said, an attack the top US envoy in Kabul blamed on the Taliban.

Violence has surged across Afghanistan in recent months despite ongoing peace talks between the Taliban and government -- especially in Kabul, where a new trend of targeted killings aimed at high-profile figures has sown fear in the restive city.

The latest attack, which US Charge D'Affaires Ross Wilson blamed on the Taliban, comes just two days after the Pentagon announced it had cut troop levels in Afghanistan to 2,500, the fewest in nearly two decades.

The attack on the judges happened as they were driving to their office in a court vehicle, said Ahmad Fahim Qaweem, a spokesman for the Supreme Court.

"Unfortunately, we have lost two women judges in today's attack. Their driver is wounded," Qaweem told AFP.

There are more than 200 female judges working for the country's top court, the spokesman added.

Kabul police confirmed the attack, which no group has claimed so far.

Afghanistan's Supreme Court was a target in February 2017 when a suicide bomb ripped through a crowd of court employees, killing at least 20 and wounding 41.

The latest attack drew widespread condemnation, with Wilson blaming the Taliban directly as he called for an investigation.

"The Taliban should understand that such actions for which it bears responsibility outrage the world and must cease if peace is to come to Afghanistan," wrote Wilson on Twitter.

The shooting came just hours after a high-level meeting between the Taliban negotiation team and US special envoy for Afghanistan Zalmay Khalilzad, along with the head of US forces in Afghanistan, General Scott Miller, according to tweets by a Taliban spokesman.

During the sit-down, spokesman Mohammad Naeem said the insurgents called again for the release of the group's remaining jailed fighters, along with the removal of the Taliban from the UN blacklist.

The Afghan government has already released almost 5,000 Taliban inmates despite widespread concern that the fighters would be used to reinforce the insurgents' ranks.

President Ashraf Ghani also accused the Taliban of launching an "illegitimate war and hostility".

Residents wash the road after the Kabul ambush
Residents wash the road after the Kabul ambush AFP / WAKIL KOHSAR

"The government once again reiterates its call on the Taliban that violence, terror, brutality and crimes... will only prolong the war in the country," he said in a statement issued by the presidential palace.

The head of the Afghanistan Independent Human Rights Commission also condemned the murders, calling the ongoing killings a "systematic massacre".

"Afghanistan is losing one of its most important gains, its educated & professional cadre, in what seems to be a systematic massacre & the world seems to be just watching. This must stop," tweeted Shaharzad Akbar.

The killing also spurred a rare statement from the Chinese embassy in Kabul, offering condolences to the victims' families.

In recent months, several prominent Afghans -- including politicians, journalists, activists, doctors and prosecutors -- have been assassinated in often brazen daytime attacks in Kabul and other cities.

Many journalists and activists have left the country, worried they might be the next targets.

Afghan officials have steadfastly blamed the Taliban for the assassinations, a charge the group has denied.

Some of these killings have been claimed by the rival jihadist Islamic State group.

Earlier this month the US military for the first time directly accused the Taliban of orchestrating these attacks.

"The Taliban's campaign of unclaimed attacks and targeted killings of government officials, civil society leaders & journalists must... cease for peace to succeed," Colonel Sonny Leggett, spokesman for US forces in Afghanistan, said on Twitter.

The targeted killings have surged despite the Taliban and Afghan government engaging in peace talks in the Qatari capital of Doha.

Afghan government negotiators engaged in peace talks with their Taliban counterparts are pushing for a permanent ceasefire as part of the agenda for the talks, but the insurgents so far have dismissed the calls for any type of truce.

The Taliban carried out more than 18,000 attacks in 2020, Afghanistan's spy chief Ahmad Zia Siraj told lawmakers earlier this month.