BERLIN (Reuters) - Germany’s Angela Merkel began the tough task of trying to build a government on Monday after securing a fourth term as chancellor, urging the center-left Social Democrats not the shut the door on a re-run of their “grand coalition”.

Damaged by her decision two years ago to allow more than one million migrants into Germany, Merkel’s conservative bloc secured 33 percent of the vote, losing 8.5 points -- its lowest level since 1949. Her coalition partners, the center-left Social Democrats, also slumped and said they would go into opposition.

Voters flocked to the anti-immigration Alternative for Germany (AfD), the first far-right party to enter the German parliament in more than half a century. However, the AfD hardly had time to savor its third-place showing before it fell into internal bickering.

Many Germans see the rise of the AfD as a similar rejection of the status quo as votes for Brexit and Donald Trump last year. But Germany’s political center held up better than in Britain and the United States as more voters have benefited from globalization and most shun the country’s extremist past.

Merkel’s party remained the biggest parliamentary bloc and Europe’s most powerful leader sought to keep her coalition options open on Monday, saying she would start talks with the Free Democrats (FDP) and the Greens as well as the SPD.

SPD leader Martin Schulz said earlier his party had no choice but to go into opposition “to defend democracy against those who question it and attack it,” after dropping to a post-war low of 20.5 percent.

“I heard the SPD’s words, nevertheless we should remain in contact,” Merkel told a news conference. “I think all parties have a responsibility to ensure that there will be a stable government.”

Merkel made clear she still intended to serve a full four years as chancellor. But her next coalition could be her toughest yet with her only remaining potential partners, the business-friendly FDP and the pro-regulation Greens, at odds on issues from migrants to tax, the environment and Europe.

The FDP’s leader Christian Lindner set the stage for tricky talks, saying his party would not agree to a coalition with the conservatives and the Greens, dubbed “Jamaica” because the parties’ colors mirror the country’s flag, at any price.

He said changes were needed in Germany’s energy policy and its stance on euro zone fiscal policy. But he struck a more conciliatory tone on Europe, saying Germany had an interest in a strong France. [B4N1JX00B]

The Greens set out climate change, Europe and social justice as their priorities in any coalition talks.

The emergence of the Greens as powerbrokers in any coalition weighed on markets. Shares in carmaker BMW BMWG.DE were down 0.2 percent, while those in automotive supplier Continental CONG.DE dropped 0.4 percent. RWE RWEG.DE -- which operates 15.25 gigawatts (GW) of coal-fired plants in Germany, 38 percent of its total European capacity -- fell 4.6 percent to a six-week low.

The party campaigned to ban the sale of new combustion-engine cars from 2030 and are calling for a quick phase-out of coal power plants.

Slideshow ( 18 images )

DIVISIONS

Many Germans were alarmed by the rise of AfD who the foreign minister likened to Nazis. Protesters threw stones and bottles at police outside its campaign party in Berlin on Sunday.

But just a day after the election, the AfD showed signs of fracturing as co-leader Frauke Petry, one of its most prominent faces, said she would not sit in parliament with AfD members. It was not immediately clear why she was making such a move.

Slideshow ( 18 images )

The election also exposed rifts in Merkel’s conservatives, with her allies the Bavarian Christian Social Union (CSU), who face a regional election next year, demanding a shift to the right to win back voters lost to the AfD.

“They will try their best to recover lost ground on the right side of the political spectrum. Going into a coalition in Berlin with the Greens and the FDP will make this more difficult,” said Janis Emmanouilidis from the European Policy Centre.

Investors were unsettled by the prospect of a weaker Merkel at the head of a potentially unstable “Jamaica” coalition and also worried that months of coalition talks could distract from talks with Britain over its divorce from the European Union.

The euro EUR=D4 and European stocks slipped, while concerns about the emergence of a more hardline stance toward the euro zone in the bloc's largest economy weighed on Southern European government bonds.

“The weak result could make Angela Merkel a lame duck much faster than international observers and financial markets think,” ING economist Carsten Brzeski said.

Klaus Wohlrabe, economist at the Munich-based Ifo economic institute, said new elections could not be excluded and the result could stoke uncertainty as German business confidence deteriorated unexpectedly in the weeks before the election.

German business also expressed concern.

Matthias Mueller, chief executive of Volkswagen, said he was “shocked” by the AfD’s double-digit showing and said the success of Europe’s largest economy hinged on its tolerance and openness to the world.

“For Germany’s biggest industrial company I say: In the globalized economy, national egoism and protectionism lead to a dead - and in the end a loss of jobs.”