German Chancellor Angela Merkel holds a candle as she attends the inauguration of memorial at the site of last year's truck attack in a Christmas market, which killed 12 people and injured many others, at Breitscheidplatz square in Berlin. REUTERS/Fabrizio Bensch

(Reuters) - German Chancellor Angela Merkel’s conservatives and the Social Democrats (SPD) have agreed to exploratory talks on forming a new government starting on Jan. 7, both parties said on Wednesday after informal discussions.

The decision, 87 days after a national election that returned a fragmented parliament and complicated coalition arithmetic, brightens prospects for a renewal of the “grand coalition” that governed Germany over the past four years.

A repeat coalition is Merkel’s best chance of securing a fourth term as chancellor after talks on forming a three-way alliance with two smaller parties broke down, leaving Europe’s largest economy in an unprecedented state of uncertainty.

“It was a good discussion in a trusting atmosphere,” the parties said in a joint statement after leaders met on Wednesday. They agreed to hold four days of talks from Jan. 7, with the aim of deciding by Jan. 12 whether to open formal coalition negotiations.

Even in the most optimistic case, Germany will have smashed 2013’s post-World War Two record of needing 86 days to form a new government after an election. The hiatus highlights that Germany, long Europe’s bastion of stability, is not immune to the political fragmentation that has swept the continent.

The conservatives and Social Democrats have identified 15 policy areas for exploration, including education, the welfare state and employment law, where the SPD is keen to carve out a distinctive left-wing identity for itself after a disastrous election showing blamed in part on Merkel’s dominant stature.

The SPD’s membership, which tends to be more radical than the party leadership, will have to ratify any decision to repeat a coalition with Merkel, who has been in power for 12 years.

(This version of the story corrects the date to Jan. 12 in fourth paragraph)