Two U.S. service members were killed in Afghanistan on Wednesday, according to NATO Resolute Support mission.
The Taliban killed the American soldiers in an ambush in southern Wardak province.
The deaths occurred after U.S. Secretary of State Mike Pompeo made an unannounced visit to Kabul.
The names of the soldiers were not revealed.
The next round of talks between the Taliban and the U.S. will begin on June 29 in Doha, Qatar.
U.S. officials said they are hoping for a deal before the upcoming Afghan presidential elections.