Angela Merkel will be German chancellor for a fourth term. But she won't have an easy ride.

The rise of the far-right, and other small parties, in Sunday's election has made it tough for Merkel to form a government that commands a majority in parliament.

The euro sagged against the dollar on Monday on the prospect of months of political wrangling before the future direction of Europe's biggest economy becomes clear.

Here's what the vote could mean for Germany, Europe and the rest of the world.

A new government by Christmas?

With Germany's second biggest party -- the Social Democrats -- heading for a spell in opposition, Merkel has only one real option: a three-way coalition between her conservative CDU-CSU bloc and two smaller parties -- the liberal FDP and the Greens.

The parties have never governed together at national level, but earlier this year struck a deal to run the German state of Schleswig-Holstein.

"Coalition talks will be difficult, they always are," said Holger Schmieding, economist at Berenberg Bank. "But Merkel is good at bridging such differences."

Regardless of those skills, it will take time. Serious talks on forming a new government are unlikely to start until the middle of October, once the result of elections in the German state of Lower Saxony are known.

That means it may be December, or even early January, before the new government takes office.

Related: German inequality may have fueled far-right surge

It could be good for the economy

The three-way coalition could give an extra boost to the German and European economies.

Merkel's party and the FDP are likely to prioritize policies that favor business and trade, and all three have promised tax cuts. The Greens also want the government to spend more money supporting families.

Related: Germans are falling out of love with their carmakers

These policies would boost consumer spending, which could in turn lower Germany's trade surplus -- something that would please the country's European partners, as well as President Trump.

Still, any shift in overall economic policy is likely to be small.

"The big picture is that any fiscal boost will be modest," said Jennifer McKeown, chief European economist at Capital Economics. "None of the three parties plans to invest as much as the [Social Democrats] advocated and all of the major parties want to keep a balanced budget."

...but possibly bad for the car industry

The Greens are likely to push hard for their environmental policies. That could spell problems for German car makers, already shaken by the Volkswagen (VLKAY) diesel scandal and claims that they were operating a cartel.

Morgan Stanley economists said dealing with the fallout from these issues was likely to take center stage in German politics, given the importance of the automotive industry to the economy.

"On the whole, the Greens pursue more ambitious goals and a more radical response to the diesel scandal," Elga Bartsch and Jan Kozak wrote in a research note.

The Greens want to ban the registration of cars with combustion engines from 2030 -- a decade earlier than Britain and France have proposed. Merkel has hinted she could support a ban but has given no indication of the timing.

Shares in Volkswagen and BMW (BMWYY) slipped on Monday, despite narrow gains on German stock markets.

Related: Infrastructure is Germany's weak link

European integration could slow

The new government might take a more cautious approach to further integration between Europe's economies.

New French President Emmanuel Macron wants to push through radical reforms of the European Union. He argues that closer cooperation between countries that share the euro currency -- such as the introduction of a common finance minister and budget -- would make Europe stronger and more stable.

Before Sunday's election, Merkel had appeared willing to work with Macron on finding a consensus for reform. Now that might be harder for her, given the liberal FDP are skeptical.

"A final compromise should still see European integration move forward in the coming years. That said, it is likely to be at a slower pace than currently envisaged by Merkel and [Emmanuel] Macron," said Ricardo Garcia, economist at UBS.