Two United States servicemen were killed during a military operation in Afghanistan on Wednesday, bringing to nine the number of American military fatalities in the country this year.

The two, part of a Special Forces team, was killed by small-arms fire in southern Uruzgan province, American defense officials said. The soldiers were engaged in a fierce firefight with Taliban militants, with combatants only yards apart at one point, one of the defense officials said.

The deaths occurred one day after an unannounced visit to Kabul, the Afghan capital, by Secretary of State Mike Pompeo.

The U.S. goal in Afghanistan “is reconciliation, to reduce the level of violence, to reduce the level of risk to Afghans broadly and the risk to American service members,” he said. “So, I think what you’ll see is a continued push by the United States to achieve the reconciliation, the reduction in risk that the president set out as the mission set for the State Department and for the United States government.”

Meanwhile, the U.S. is holding direct talks with the Taliban in Doha, the Qatari capital. The seventh round of the talks is scheduled to begin on Saturday.

“We’ve made clear to the Taliban that we’re prepared to remove our forces. I want to be clear, we’ve not yet agreed on a timeline to do so,” Pompeo told reporters during an unannounced stop in Afghanistan on Tuesday. The presence of troops in Afghanistan is “conditions-based, he said.

The two deaths Wednesday bring this year’s total of U.S. troop deaths in Afghanistan to 10, according to iCasualties, a website that tracks casualties of U.S. forces in Afghanistan and Iraq.

In April, three U.S. service members and a contractor were killed in car-bomb attack outside Bagram airfield, the largest U.S. military base in the country. The Taliban claimed responsibility for that attack.