President Obama is halfway around the world on a trip to promote American values, but in the wake of the Paris terror attacks, he is embroiled in a heated shouting match with critics back home over just what those values are.

The president’s visceral disgust at Republican suggestions that his administration deny entry to refugees fleeing war-torn Syria boiled over in the Philippines on Wednesday. Addressing reporters at an economic summit, he accused the GOP of being “scared of widows and orphans” and punctuated the upbraiding by calling the party’s rhetoric a “potent recruitment tool” for the Islamic State.

At its core, Obama’s fight with his political rivals is not just about refugees but about a broader sentiment among some Republicans that the president has consistently played down the threat posed by terrorist groups. Obama referred to the Islamic State as the “JV team” — a junior squad — two years ago and suggested just hours before the group’s attacks in Paris on Friday, in which at least 129 people were killed, that his policies had “contained” it.

Obama has used drone strikes to kill terrorists who pose a threat to the United States, even as he has worried that the threat posed by extremist groups has been consistently overstated, leading the United States to make costly foreign policy blunders and betray its core values. That tension between the president, who worries that Americans will over­react to the terrorism threat, and his opponents, who insist that his administration is minimizing or ignoring it, has persisted for years.

In the aftermath of the Paris attacks, that tension has come to a head. Instead of uniting Americans to battle a ruthless enemy, the massacre in France has exposed deep rifts among political interests with vastly differing views of the terrorist threat and the proper response to it.

President Obama and Secretary of State John F. Kerry have been verbally sparring with Republican presidential candidates after the attacks in Paris. At left is Sen. Ted Cruz (Tex.), and at right is New Jersey Gov. Chris Christie. (Sarah Parnass/The Washington Post)

“Some of them seem to think that if I were just more bellicose in expressing what we’re doing, that that would make a difference,” Obama said dismissively of his critics on Monday during a summit in Antalya, Turkey.

But some argue that the president’s reaction was inappropriate to the moment. “It’s been a bloodless response,” said William A. Galston, a senior fellow at the Brookings Institution who was a top adviser during Bill Clinton’s presidency. “At one point, he used the word ‘setback,’ which is amazingly unresponsive to the emotionality of these events.”

As he has proceeded on his nine-day trip — the last stop will be in Malaysia on Friday — Obama has wearily defended his strategy against the Islamic State, saying time and again that he will not change course after Paris. Obama’s extended rebuke of the GOP over the migrant crisis represents an effort to broaden the debate and turn the criticism back on his political adversaries. Some Republican presidential candidates have suggested that the United States let in Christians fleeing Syria but exclude Muslims also fleeing that country.

Obama thinks his critics have been reckless with their rhetoric and simplistic in their approach to solving complicated problems in a dangerous world. Denying desperate migrants entry to the United States will not keep Americans safer, he said. Rather, it risks making the country complicit in the problem, weakening the United States’ standing abroad.

“What I do not do is to take actions either because it is going to work politically or it is going to somehow, in the abstract, make America look tough or make me look tough,” the president said. He accused his rivals of wanting to “pop off” without proposing any viable alternatives, and he mocked the Republican presidential candidates for boasting that they could stare down Russian President Vladi­mir Putin in Ukraine or the Islamic State in Syria while they complained about hostile moderators in a recent GOP debate.

A fight over foreign policy could define Obama’s final year in office, as his legacy becomes fodder in the 2016 campaign for the White House, especially if the improving economy gives Republicans less of an opening on domestic issues.

Obama’s refusal to significantly alter his strategy in Syria — for instance, by authorizing the deployment of large numbers of U.S. ground troops — has become the latest evidence among his critics that the president has been blinded by a desire to correct for the foreign policy overreach of the George W. Bush administration.

Republicans have argued that Obama is weak and feckless abroad, beholden to a naive worldview and unwilling to deploy the military to defeat U.S. enemies — or even acknowledge who those enemies are.

They have accused him of not protecting U.S. diplomatic facilities in Libya, pulling troops out of Iraq too quickly, and backing down to Russia’s advances in Ukraine and to China’s aggression in the South China Sea, relinquishing U.S. power along the way.

“We all have sympathies for people who have been uprooted,” former Florida governor Jeb Bush, a Republican presidential candidate, said Tuesday of Syrian migrants. “But we have a duty to protect our country as well. And that’s the point.”

To Obama, the GOP’s turn to military force to resolve disputes helped bring about the instability in the Middle East. He has pointed to times he has authorized the use of force, including the killing of Osama bin Laden and the decision this year to leave more U.S. troops in Afghanistan next year than were initially committed.

But Obama also has made a priority of relying on other elements of American power and diplomacy to demonstrate leadership, build partnerships and extract concessions from adversaries.

On his trip, Obama has touted a 12-nation Pacific Rim trade pact, U.S. support for recent democratic elections in Burma and collaboration with China on climate change as evidence that his policies are paying dividends. He has staked much of his Middle East legacy on the Iran nuclear deal and defied many Republican leaders by restoring diplomatic relations with Cuba.

It is the criticism of his policies on the migrant crisis, however, that has drawn the strongest reaction from the president this week. “Yeah, I’ve got some comments on that,” he said Wednesday before a reporter had finished her question.

Obama acknowledged that Paris, with its cafes and public parks and sports stadiums, reminds Americans of their own way of life, so that the attacks were perhaps more acutely felt in the United States than other Islamic State atrocities were. But, he said, “we are not well served when in response to a terrorist attack we descend into fear and panic. We don’t make good decisions if it’s based on hysteria or an exaggeration of risks.”

He added that “when candidates say, ‘We wouldn’t admit 3-year-old orphans,’ that’s political posturing. When individuals say that we should have a religious test and that only Christians — proven Christians — should be admitted, that’s offensive and contrary to American values.”

Washington Gov. Jay Inslee (D) said Wednesday that he would welcome Syrian refugees, rejecting calls by more than two dozen governors who said they oppose the settlement of refugees in their states. Inslee cited a need not to give in to the kind of fear that gripped Americans after Japan’s World War II attack on Pearl Harbor, which led to the establishment of internment camps for Japanese Americans.

“We regret that. We regret that we succumbed to fear,” Inslee said in an interview with NPR. “We regret that we lost moorage for who we were as a country. We shouldn’t do that right now.”

In 2014, during a speech to the U.N. General Assembly, Obama referred to racially charged riots in Ferguson, Mo., as an example that other countries might point to as evidence that Americans should not lecture the world on democracy and freedom. But he quickly added that what makes the United States exceptional is “the willingness to criticize ourselves when we fall short.”

“We welcome the scrutiny of the world,” Obama said then.

On Wednesday, he did not sound as optimistic.

“They’ve been playing on fear in order to try to score political points or to advance their campaigns,” Obama said of Republicans. “And it’s irresponsible. And it’s contrary to who we are. And it needs to stop, because the world is watching.”

Greg Jaffe in Washington contributed to this report.