President Barack Obama on Wednesday outlined a foreign policy vision of "might doing right," arguing that modern pragmatism requires both a strong military and the diplomatic tools of alliances and sanctions to exert influence and provide global leadership.

He told graduating cadets at the U.S. Military Academy at West Point that after the nation's "long season of war and divisions about how to move forward," they now would represent America with the duty "not only to protect our country, but to do what is right and just."

Under fire from the political right for what critics call diminishing U.S. global influence, Obama offered a robust defense of his foreign policy as the pragmatic and most effective expression of America's leadership role in the world.

"I believe in American exceptionalism with every fiber of my being," he said, referring to a tenet of conservative ideology.

"But what makes us exceptional is not flouting international norms and the rule of law; it's our willingness to affirm them through our actions," Obama said in arguing that true leadership involves not only having the world's most powerful military, but in doing the right thing.

JUST WATCHED

Obama: Military force used if necessary

MUST WATCH

JUST WATCHED

Obama outlines foreign policy vision

MUST WATCH

Obama outlines foreign policy vision01:54

PLAY VIDEO

"America must always lead on the world stage," Obama said, and the military "always will be the backbone of that leadership," but U.S. military action "cannot be the only -- or even primary -- component of our leadership in every instance."

In a direct jab at his detractors, the President said those "who suggest that America is in decline, or has seen its global leadership slip away, are either misreading history or engaged in partisan politics."

One of the most strident critics, Republican Sen. John McCain of Arizona, responded Wednesday by telling CNN that America remained mighty but Obama has failed to follow through on threats such as his "red line" for U.S. military strikes if the Syrian government used chemical weapons.

"We are unreliable, and all our allies and our enemies believe that," said McCain, who lost to Obama in the 2008 presidential election.

To George Mitchell, the former Senate leader who served as Obama's Middle East peace envoy, the President "made a persuasive case to the reality that we cannot intervene militarily everywhere."

However, Mitchell said the United States should have done more to help the Syrian opposition without sending U.S. troops.

In a sign of the sentiments of the cadets and those attending their commencement ceremony, Obama got big applause when he noted they were the first West Point graduates in more than a decade unlikely to be stationed in a war zone.

Since he took office, Obama noted, America had ended the Iraq war and was preparing to end the Afghanistan conflict, decimated al Qaeda's leadership in the border region between Pakistan and Afghanistan, and eliminated Osama bin Laden.

Now it was time to shift foreign policy to combat a continuing terrorist threat that "no longer comes from a centralized al Qaeda leadership," but from "decentralized al Qaeda affiliates and extremists, with agendas focused in the countries where they operate."

"It heightens the danger to less defensible targets, as we saw in a shopping mall in Nairobi," he said of the attack last year in Kenya. "So we have to develop a strategy that matches this diffuse threat; one that expands our reach without sending forces that stretch our military thin, or stir up local resentments."

Obama also spoke of his personal burden as a wartime leader, saying he was "haunted" by the dead and wounded among troops he ordered to Afghanistan.

"I would betray my duty to you, and to the country we love, if I sent you into harm's way simply because I saw a problem somewhere in the world that needed to be fixed, or because I was worried about critics who think military intervention is the only way for America to avoid looking weak," he told the graduating cadets.

Returning to a theme he's visited throughout his presidency, Obama said he would continue to push for closing the terrorist detention facility at Guantanamo Bay "because American values and legal traditions don't permit the indefinite detention of people beyond our borders."

Overall, Obama said, "America has rarely been stronger relative to the rest of the world," and he contended that "those who argue otherwise -- who suggest that America is in decline, or has seen its global leadership slip away -- are either misreading history or engaged in partisan politics."

"The question we face -- the question each of you will face -- is not whether America will lead, but how we will lead, not just to secure our peace and prosperity, but also extend peace and prosperity around the globe," Obama told the cadets.

"We can not only responsibly end our war in Afghanistan and achieve the objectives that took us to war in the first place, we'll also be able to begin a new chapter in the story of American leadership around the world," Obama said in the White House Rose Garden on Tuesday.

Afghanistan President Hamid Karzai welcomed Obama's announcement of planned troop levels, saying in a statement posted Wednesday on his official website that his government was "grateful to the international community for its assistance and remains confident" in the ability of the expanded and NATO-trained Afghan forces to protect the country and its people.

Although Obama enjoyed high-profile foreign-policy successes at the beginning of his time in office, including the military mission to find and kill bin Laden, he's come under harsh criticism recently for what opponents say is a passive approach abroad.

They cite his record in Syria, where he backed away from airstrikes after President Bashar al-Assad's regime was reported to have used chemical weapons on citizens. Congress balked at approving the military force, leaving Obama to instead negotiate a deal that would remove the chemical stockpiles from al-Assad's control but keep al-Assad himself in power amid an ongoing civil war.

While the administration has provided non-lethal aid to the Syrian opposition, it has stopped short of supplying weapons and ammunition called for by McCain and other critics.

In his speech, Obama said there was no military solution to the Syrian civil war, and added that he will "work with Congress to ramp up support for those in the Syrian opposition who offer the best alternative to terrorists and a brutal dictator."

Speaking to CNN's "New Day," he said he found it difficult to believe that critics would have preferred a military strike and hurting the al-Assad regime temporarily. He said that 92% of Syria's chemical weapons have been removed, and the other 8% are under control, waiting to be removed.

"It's remarkable to me that people simply want to refuse to accept that we're better off getting all of the weapons out than striking for one or two days and doing damage to some of them," Kerry said.

McCain argued that the result of the administration's response meant that Syrian President Bashar al-Assad consolidated his grip on power, Hezbollah fighters and Iran's Revolutionary Guard were helping him out, Russia was increasing support for his regime and the war has become "a regional conflict and a tragedy of monumental proportions for which we will pay a heavy price in years to come."

Critics of Obama's foreign policy also have said the President's clear assertion that military force is off the table in Ukraine sends the wrong message to other countries -- namely China -- that have their own territorial disputes with neighbor states.

The United States and its allies have imposed economic sanctions on Russia for its incursion into Ukraine, though that step hasn't done much to quiet the arguments coming from Obama's detractors.

On Wednesday, Obama reiterated his policy that the United States will used military force, "unilaterally if necessary," when its people are threatened, its livelihood is at stake or allies are in danger, but he said the threshold was higher when global issues "do not pose a direct threat" to the nation.

"In such circumstances, we should not go it alone," he said. "Instead, we must mobilize allies and partners to take collective action. We have to broaden our tools to include diplomacy and development; sanctions, isolation; appeals to international law and -- if just, necessary, and effective -- multilateral military action."

Such a collective approach "is more likely to succeed, more likely to be sustained, and less likely to lead to costly mistakes," Obama said.

Obama last spoke broadly about his foreign policy during a trip to Asia in April, defending himself against those who say his policy lacks a discernible direction.

"You hit singles; you hit doubles; every once in a while we may be able to hit a home run," Obama said in Manila, lashing out at those who argue for greater use of military force in conflicts abroad.

"Why is it that everyone is so eager to use military force?" he asked then. "After we have just gone through a decade of war at enormous costs to our troops and our budget. And what is it exactly that these critics would have accomplished?"

According to aides, Obama's West Point speech kicks off a broader foreign policy push that will carry into his upcoming trip to Europe that includes a G7 summit in Brussels and a visit to Poland, designed to reassure Eastern European allies after Russia's intervention in Ukraine.