COLORADO SPRINGS, Colo. (AP) — President Barack Obama is giving his final commencement speech to U.S. Air Force Academy graduates who are coming of age at a time of fresh global threats that seem to be pulling the U.S. back into conflicts with uncertain ends.

When he came into office in 2009, Obama pledged to end two wars and to keep America’s fighting forces out of unnecessary entanglements. In one of his first addresses to graduates, just months on the job, he told the U.S. Naval Academy that he promised to deploy the country’s diplomatic, economic and moral influence so that the military alone wouldn’t bear the burden of keeping Americans safe.

“It’s a promise that as long as I am your commander in chief, I will only send you into harm’s way when it is absolutely necessary, and with the strategy and the well-defined goals, the equipment and the support that you need to get the job done,” Obama said in Annapolis, Maryland.

His speech Thursday in Colorado Springs, Colorado, comes amid difficult questions about whether the fights the U.S. is now waging meet those criteria, nebulous as they may be.

As Obama eyes the end of his term, he’s weighing whether to once again increase the number of troops he’ll leave in Afghanistan when he leaves office. In Iraq, U.S. troop levels have gradually crept back up to help fight the Islamic State group, with special forces also dispatched to Syria and Libya. Deep concerns about Russia and China have spurred calls for the U.S. and its allies to take a more aggressive military posture in eastern Europe and Asia.

White House officials said Obama wouldn’t use his speech to make major policy pronouncements, but would instead adopt an optimistic tone about how young military members should approach the future.

“It will be an opportunity for him to talk to those graduates about the security challenges that are facing the United States and the important role that the next generation of American servicemen and women will face as they protect the country,” White House spokesman Josh Earnest said.

Though Obama ended the formal U.S. combat mission in Afghanistan, some 9,800 troops remain there helping Afghans battle a resurgent Taliban, a reminder of how unstable the country remains fifteen years after the U.S. went to war there. White House officials have said Obama is inclined to listen to his commanders, and many military leaders are pushing to leave more than the 5,500 troops Obama earlier said would remain.

Adding to the uncertainty is the presidential election. Likely Democratic nominee Hillary Clinton has adopted a slightly more hawkish tone than Obama. On the Republican side, Donald Trump has pledged to grow the U.S. military and intensify the military fight against IS, but has also unnerved foreign capitals with talk of the possible spread of nuclear weapons to Japan and South Korea.

For Obama, the speech is the culmination of a yearly tradition of addressing one of the military’s four service academies at graduation. This year, Obama also delivered commencement addresses at Howard University, a historically black school in Washington, and Rutgers University, a public university in New Jersey.

___

Reach Josh Lederman on Twitter at http://twitter.com/joshledermanAP

Copyright 2024 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Join our Newsletter for the latest news right to your inbox