KABUL, Afghanistan — Two American service members were killed during an operation in Afghanistan on Friday, the U.S. and NATO forces said, providing no other details on the combat deaths.

The fatalities, which bring to four the number of U.S. soldiers killed so far this year in Afghanistan, underscore the difficulties in bringing peace to the war-wrecked country even as Washington has stepped up efforts to find a way to end the 17-year war, America’s longest.

The U.S. and NATO Resolute Support mission said the names of the service members killed in action were being withheld until after notification of the next of kin, in accordance with U.S. Department of Defense policy. The statement also did not specify the location of the combat or say who the soldiers were fighting.

“The incident is under investigation and we have no additional information to provide,” said Sgt. 1st Class Debra Richardson, a Resolute Support spokeswoman.

There are about 14,000 U.S. forces in Afghanistan, supporting embattled Afghan forces as they struggle on two fronts — facing a resurgent Taliban who now hold sway over almost half the country and also the Islamic State affiliate, which has sought to expand its footprint in Afghanistan even as its self-proclaimed “caliphate” has crumbled in Syria and Iraq.

In 2001, after the Sept. 11 attacks on New York and Washington, the U.S. invaded Afghanistan and ousted the ruling Taliban regime in a matter of weeks. But the Taliban subsequently regrouped while Washington shifted its attention to Iraq’s Saddam Hussein, and by 2009, the war had become a stalemate.

The Pentagon has recently been developing plans to withdraw up to half of the American forces still in the country while at the same time stepping up efforts and having the U.S. negotiate with the Taliban.

U.S. envoy Zalmay Khalilzad, the Trump administration’s main negotiator with the Taliban, concluded earlier this month a 13-day marathon session with leaders of the insurgent group.

Following the talks, held in Qatar where the Taliban maintain an office, Khalilzad said the two sides reached two “draft agreements” covering the withdrawal of U.S. troops and guarantees that Afghanistan would not revert to a haven for terrorists.

But he was unable to persuade the Taliban to launch talks with the Afghan government. The Taliban have consistently refused to talk with the government in Kabul, describing it as a U.S. puppet.

The two sides seem to be in agreement about the withdrawal of American forces, but divided over the timeline and whether a residual American force would remain.

Last year, 13 U.S. service members were killed in Afghanistan.