Germany yesterday became the latest country where voters rejected a left-leaning government largely because of their unhappiness over immigration and the economy.

Germany’s next chancellor is likely to be Friedrich Merz, a former corporate lawyer who has promised to crack down on migration, cut taxes and regulation and adopt a hawkish policy toward Russia. Merz leads a center-right alliance that finished first in yesterday’s election, with 29 percent of the vote. A far-right party, Alternative for Germany, that promises even tougher immigration policies — but is friendly toward Russia — finished second, with 21 percent of the vote.

The center-left Social Democrats, who led the government for the past four years, tumbled to third place, with 16 percent of the vote. It was their worst showing in a national election since at least 1890.

Merz now faces the challenge of putting together a coalition that includes more than half of the seats in the German Parliament. Like other mainstream politicians, he has vowed to exclude the far right from his coalition because of its extremism, including its embrace of slogans and symbols with Nazi overtones. You can read more about the coalition scenarios here. You can also read more about Merz.

The campaign was dominated by two issues that have also shaped recent politics in the United States and many other parts of Europe: immigration and the economy.

In Germany, the share of the population born in another country has reached nearly 20 percent, up from 12.5 percent in 2015. The increases have brought rapid change to communities. And although many recent immigrants have fared well in school and in the job market, many others have not.

Crime became a salient issue in the campaign. Recent data suggests that foreigners commit about 40 percent of crimes in Germany, Graeme Wood of The Atlantic pointed out. (Immigrants in the U.S., by contrast, commit crimes at a lower rate than natives, despite President Trump’s false claims.) Over the past 10 months, Germany has experienced at least four fatal attacks by migrants who had failed to receive asylum but nonetheless remained in the country.

The struggling German economy, once the envy of the world, also loomed over the campaign. The auto industry has not kept pace with the shift toward electric vehicles, and Germany lacks a culture of entrepreneurship, many economists say.

“Unlike in America last year, there is no one, on the left or the right, arguing that actually things are going pretty well economically,” Jim Tankersley, The Times’s Berlin bureau chief, told me. “When you talk to voters, it is usually the very first thing they bring up.”

Germany’s election continues a slump for left-leaning parties in affluent countries, often connected to immigration and the economy. Those two issues helped Trump win the presidency. In Canada, Justin Trudeau has announced his resignation. In much of the Europe, the far right has become more popular.

Some of these trends are part of a general backlash to political establishment, in response to Covid and post-pandemic inflation. But it’s not just an anti-incumbent mood; the political left is having a harder time than the right in most countries.

There is one glaring exception, and it happens to be a country on Germany’s northern border: Denmark. There, the center-left Social Democrats have run the country since 2019. They won re-election in 2022, after Covid had receded.

Under Prime Minister Mette Frederiksen, who was only 41 when she took office, the party has compiled a strikingly progressive record. It has expanded abortion rights, enacted ambitious climate policies, cracked down on private-equity firms, made the retirement system more favorable to low-income workers and spent a greater share of G.D.P. on Ukraine aid than any other country.

How did the party do all of this during a period of right-wing ascendancy? I recently traveled to Denmark to study that question, and the answer has a lot to do with immigration. The Times Magazine published my story from Denmark this morning. I hope it will help you better understand politics not just in Denmark but also in Germany, the U.S. and elsewhere.

Ethicist: Help! I’ve learned my sister’s therapist is also a spiritual medium.

Most clicked yesterday: Investigations into six killings are looking at a fringe group known as the Zizians. They are followers of someone known as Ziz, who blogged about self-improvement, ethics and A.I.

Metropolitan Diary: A train dance party.

Lives Lived: Lynne Marie Stewart played Miss Yvonne on “Pee-wee’s Playhouse,” among more than 150 credits in a six-decade acting career. She died at 78.

N.B.A.: Joel Embiid, the 76ers star who was M.V.P. in 2023, is considering ending his season early to undergo knee surgery. Our columnist argues he should shut it down.

N.F.L.: As the combine kicks off this week, the Colorado quarterback Shedeur Sanders — considered a polarizing prospect — will not work out for teams.

College basketball: Arizona apologized after its students heckled B.Y.U.’s team with a derogatory chant about Mormons, known formally as members of The Church of Jesus Christ of Latter-day Saints.

“Conclave” won best picture at the Screen Actors Guild Awards, beating “Anora.” Timothée Chalamet won best actor for “A Complete Unknown,” and Demi Moore won best actress for “The Substance.”

Read more about the awards and see the best outfits.