KABUL — Two U.S. troops were killed in Afghanistan on Friday while carrying out an operation, the U.S.-led NATO coalition said, bringing the total number of American combat deaths in the country to four this year.

Their deaths, which the Taliban and an Afghan security official said occurred in the northern Kunduz province, come as the U.S. plans to withdraw its 14,000-troop advisory mission in Afghanistan. 

The Taliban said that three Americans and nine Afghan soldiers from the country’s elite commando force were killed during a house raid in the province and that fighting was ongoing.  

“American occupying forces and their local slaves wanted to raid a house but faced tough resistance,” Taliban spokesman Zabiullah Mujahid said through a messaging app.  

It was not immediately clear whether the Taliban, which contests or controls nearly half of the country’s districts, was engaged in the fighting. The insurgent group often exaggerates death tolls in its favor.

The NATO coalition declined to provide more details and will not disclose the names of the Americans until 24 hours after their next of kin are notified, according to Department of Defense policy. 

President Trump recently tied the withdrawal to progress toward a peaceful settlement aimed at ending the 18-year war. 

Despite the talks, Afghanistan is suffering from crippling violence, with a record number of civilian casualties last year. On Thursday, a string of bombs exploded in Kabul as Afghans celebrated the Persian new year, Nowruz, killing six and wounding 23 more. The Islamic State claimed responsibility Friday for the bombings near a Shiite shrine and cemetery, saying the aim of the attack “was to spoil the ritual of the polytheists.” 

Peace talks between the United States and the Taliban have intensified in recent months, negotiations that have rankled the Afghan government in Kabul, which has been excluded from the process. 

Parallel talks have also been held in Moscow, and in an effort to expand internationally, the U.S. chief negotiator, Afghan-born Zalmay Khalilzad, is hosting his Russian, Chinese and European Union counterparts in Washington on Thursday and Friday. 

Last week, relations between Washington and Kabul hit a new low when Afghanistan’s national security adviser, Hamidullah Mohib, charged that any U.S. deal with the Taliban would “sell out” his country and “dishonor” American troops who fought and died in the conflict. He added that Khalilzad was acting out of personal ambition. 

In response, Mohib was barred from any future dealings with U.S. officials, Afghan and U.S. media reported.