WASHINGTON — With the end of the nation’s longest war in sight, President Barack Obama outlined his vision Wednesday for a U.S. foreign policy that is skeptical of new military engagements and prepared to juggle high-tech threats, rising regional powers and terrorist hot spots.

Although the White House had touted the speech as a major foreign policy address, he didn’t outline a sweeping doctrine or new set of policy goals. Instead, he mounted a forceful defense of the mostly minimalist, multilateral policies he has followed overseas since taking office in 2009.

“U.S. military action cannot be the only – or even primary – component of our leadership in every instance,” Obama told the graduating class at the U.S. Military Academy. “Just because we have the best hammer does not mean that every problem is a nail.”

He did not dwell on his administration’s embrace of armed drones to kill terrorist suspects and militants, chiefly in Pakistan and Yemen. The drone strikes have sparked outrage in several countries, and arguably are the most controversial part of his foreign policy legacy.

But Obama sought to explain what critics call his whack-a-mole approach to tackling crises in the world, from Syria to Ukraine to Nigeria. A growing group of experts has argued that the lack of clear White House strategy has strained U.S. credibility with allies in Europe, the Middle East and Asia, and emboldened adversaries in Moscow, Beijing and elsewhere.

Obama acknowledged those dangers. “Russia’s aggression toward former Soviet states unnerves capitals in Europe, while China’s economic rise and military reach worries its neighbors,” he said.

But Obama took on the critique by praising moderation, not intervention, and emphasizing the use of diplomacy, alliances and investments to expand and protect U.S. interests around the globe.

And he reminded the future soldiers of what the White House hopes will be his chief foreign policy accomplishment: disengagement from two wars, and a reluctance to send U.S. ground troops into other conflicts. Obama spoke a day after the White House announced his decision to withdraw all but 9,800 U.S. troops from Afghanistan by the end of 2014.

While terrorism is still the “most direct threat” to Americans at home and abroad, invasions of countries that harbor terrorist networks are not sustainable, he said. Instead, he said, America must shift counterterrorism strategy “to more effectively partner with countries where terrorist networks seek a foothold.”