When a preliminary report for the federal Transportation Ministry recommended speed limits on the autobahn and higher gas prices to lower carbon emissions, the public response was so hostile that the ministry disavowed it.

Even children are considered fair game: Greta Thunberg, the 16-year-old Swedish climate activist, is a favorite target of the German right, with the secretary general of the Christian Democrats calling her political stance “pure ideology.”

How did the environment become so hot, so fast?

First, there are good reasons to be angry when the German government calls for significant sacrifices by everyday citizens for the health of the planet — even as it let Volkswagen and other carmakers get away with cheating on emissions data.

At the same time, populist parties in Germany and Europe are increasingly campaigning against environmental rules. Such opposition perfectly fits into populist narratives and patterns: skepticism about science, anger over “political correctness” and a libertarian reflex against government regulations in general. The mainstream right is following suit, claiming to try to cut off the far right but in reality taking advantage of a suddenly attractive political target.

Environmental issues produce the same fundamental cleavages as migration. Both migration and environmental policies are aiming at global and moral goals that citizens profit from only in the abstract, while the costs are immediate. Accepting asylum seekers is a global moral responsibility; the “costs” — overcrowded kindergartens and schools, neighborhood tensions — are local. Getting rid of old diesel cars might be a vital step toward fighting climate change, but how are you supposed to get to work?

On immigration or the environment, where you stand is a matter of your worldview. Whether you drive a car or ride a bike has become a symbol for embracing or rejecting a whole set of values connected to the notion of global responsibility. Conservatives and traditionalists feel they are being pressured by the cultural imperialism of urban liberal elites who can afford not to have a car.

And it’s on this divide, more than on any particular policy, where the clash is hottest. Annegret Kramp-Karrenbauer, the new head of the Christian Democrats, recently lashed out against Berlin’s “latte macchiato drinkers,” while Mr. Scheuer, the minister of transportation, said in an interview, “In Berlin’s political scene, people are gloating over discussions which often have nothing to do with the everyday realities of people outside the capital.”