President Trump walks to a joint statement in the Rose Garden with Indian Prime Minister Narendra Modi at the White House in Washington on June 26, 2017. (Jabin Botsford/The Washington Post)

BERLIN — President Trump has alarmed citizens of the nation’s closest allies and others worldwide, diminishing the standing of the United States in their eyes, according to a wide-ranging international study released Monday.

But in the survey of 37 countries, Russia is a bright spot for Trump. As beleaguered as the president is at home, a majority of Russians say they have confidence in him. And Russians’ attitudes toward the United States have improved since Trump took office.

Elsewhere, though, and with remarkable speed, Trump’s presidency has taken a toll on the United States’ image abroad.

The international survey by the Pew Research Center found that favorable ratings of the United States have decreased from 64 percent of people across all countries surveyed at the end of Barack Obama’s presidency to 49 percent this spring. The new figures are similar to those toward the end of the George W. Bush administration.

The president himself has fared even worse: A median 22 percent are confident that Trump will do the right thing in global affairs, down from 64 percent who had confidence in Obama.

From Chile to Italy, from Sweden to Japan, majorities consider the president arrogant, intolerant, unqualified and dangerous. On the flip side, most view him as a strong leader. And many expect their country’s relationship with the United States to withstand his presidency.

It is perhaps unsurprising that a man who campaigned on a pledge to put American interests first would generate backlash in other parts of the world. Nor is it surprising that the negative reaction would carry over to opinions about the United States itself. Particularly in Europe, “that’s almost a reflex,” said Daniel Fried, a former assistant secretary of state for European affairs.

What is surprising, said Frank G. Wisner, a former diplomat who served under Democrats and Republicans, is the degree to which Trump has scorned principles the United States has not only long espoused but also helped to define in the previous century. These include democratic governance, free markets, collective security, human rights and the rule of law — commitments that together, Wisner said, delineate the liberal international order.

(Sarah Parnass/The Washington Post)

“America’s image has taken hits in recent years, from the decision to invade Iraq to the events of 2007 and 2008, when the American financial model took a huge hit,” he said. “But the most consequential is the ascent of Mr. Trump to the Oval Office.”

Global popular opinion matters, Wisner said, in part because it defines how foreign leaders engage with American interests.

The depths of disapproval registered abroad suggest that Trump has undone the progress Obama made in burnishing the American brand. It took Bush eight years, and the quagmire in Iraq, to notch such dismal ratings overseas, according to Pew. It has taken Trump six months.

His unpopularity is the result of a mix of disagreement with his signature policy objectives, such as building a wall along the U.S.-Mexico border, and distaste for his character, according to Pew’s analysis of poll results.

Among other world leaders studied by Pew, German Chancellor Angela Merkel receives relatively high marks. The share of people who report little or no confidence in her, a median of 31 percent across 37 countries, is less than half that for Trump, at 74 percent. The survey found that 59 percent lack confidence in Russian President Vladimir Putin and 53 percent in Chinese President Xi Jinping.

Trust in the American president plummeted most in some of the United States’ closest allies in Europe and Asia, as well as in the countries it borders, Canada and Mexico. In only two countries, Russia and Israel, does Trump receive a higher score than Obama.

Since 2002, when Pew began examining the United States’ image abroad, perceptions of the United States have run in parallel with judgments about the country’s president. Opinions of the United States have improved in Russia, as confidence in the president rose from 11 percent toward the end of Obama’s two terms to 53 percent under Trump, which is among his best ratings — along with figures for Israel, Nigeria and Vietnam.

There is no directly comparable number for Americans, as approval ratings and confidence questions employ different wording, although public polls have found that majorities of Americans disapprove of Trump’s overall job performance and his handling of foreign policy.

Germans hold some of the most negative opinions of the United States, with 62 percent viewing the country unfavorably and 87 percent lacking confidence in Trump.

Germany joins more than half of the 37 countries surveyed where approval for the United States fell by double digits this year. In Mexico, positive views of the United States have been cut in half, from 66 to 30 percent. Women tend to see the United States more negatively than do men in 10 of the countries surveyed, and in 16 countries, older people are more distrustful than the young.

At the same time, affinity for Americans remains intact, as does the popularity of American popular culture, Pew found. Most people think Washington respects the personal freedoms of Americans, yet there is growing doubt about American-style democracy, in France and Germany, among other countries. With Asia a notable exception, more people disapprove than approve of the spread of American ideas and customs to their countries.

The complexity was on display recently in a classroom at the Free University in Berlin. The topic was “Democracy and the State in the U.S.”

One of the professors, Christian Lammert, said his students represent the first living generation to come to political consciousness with the United States’ position on the global stage in doubt. American democracy, in the students’ eyes, had proved imperfect, not least owing to the treatment of racial minorities. With their own country, Germany, playing a newly authoritative role, they are learning how fundamentally geopolitics could shift over the next decades, Lammert said.

In Britain, a country seized by political uncertainty as it sorts out its relationship to Europe, “there’s incredulity about Trump,” even among many who supported the Brexit referendum, said Michael Borio, a local council member in London.

Nicholas Guyatt, an American historian at the University of Cambridge who has written about the waning of American power, attributed Trump’s low favorability abroad not just to the spectacle of bedlam in Washington but to a deeper disconnect between the American president and the rest of the world.

Abroad, Guyatt said, people see that Trump’s vision of American greatness is a relic.

“We’re in an uncertain place, because if the U.S. is no longer playing this role in a particular vision of world order, what’s the substitute? A different vision? Chaos?” he said.

The Pew Research Center survey was conducted from February to May among national random samples of 852 to 2,464 interviews in each of the 37 countries. The margin of sampling error for each country ranges from plus or minus 3.2 to 5.7 percentage points.