‘‘Starting this spring our troops will have a different mission: training, advising and assisting Afghan forces,’’ Obama said.
He added later that even in a backup role he could not rule out that U.S. troops could be drawn into combat.
‘‘The environment is going to still be very dangerous,’’ Obama said. But he emphasized that the main role of U.S. forces starting this spring will be support, such as training and advising.
Karzai said he was pleased by the agreement, in part because it means that by spring there will be no foreign troops in Afghan villages. That implies an end to a U.S.-led program in which U.S. special operations forces have moved into rural villages in small numbers to quietly build the beginnings of local resistance to the Taliban.
In their statement the leaders said they discussed the possibility of a continued U.S. troop presence beyond December 2014, when the U.S. and allied combat mission is to end. But they did not settle on any specifics.
Friday’s meeting was the first between Obama and Karzai since November’s U.S. presidential election.
Associated Press writer Donna Cassata contributed to this report.