BERLIN — Despite Germany’s 10-year economic boom, a far-right party has managed to become Germany’s main opposition in Parliament, enter every state legislature in the country and vie for first place in elections in the former Communist East next month.

And now the economy is slowing.

At a moment when populism is riding high in various corners of Europe, often against the backdrop of economic distress and high unemployment, a downturn in the Continent’s richest and most stable liberal democracy could add fuel to the fire and strengthen the nationalist Alternative for Germany party, or AfD, analysts said.

“Economic crises fuel a fear of the future, a sense of decline and the sense that the elite is failing the people,” said Yascha Mounk, an expert on populism and author of “The People Vs. Democracy.” “That’s fertile ground for populists.”

Marcel Fratzscher, a respected German political economist and professor at Humboldt University in Berlin, put it more directly: “The economic slowdown should rather help the AfD.”