German politicians have achieved a breakthrough in talks aimed at forming a new coalition government.
Angela Merkel's Christian Democratic Union and the centre-left Social Democrats have agreed on a paper outlining the basis for moving ahead with formal coalition talks.
Politicians stayed up all night to discuss the 28-page document, with the talks lasting more than 24 hours.
But another participant in the talks said the two blocs were still struggling to find common ground on the most divisive issues - taxes, pensions, migration and healthcare.
But SPD leader Martin Schulz, a former president of the European Parliament, is pursuing a very different vision, calling for the creation of a United States of Europe by 2025 - seen as an expensive distraction by many conservatives.
"We are working seriously. on creating the conditions to be able to live well in Germany in 10 or 15 years", she said. They signalled that a stronger alliance with France in the European Union would be a priority. It said the parties are committed to "strengthening social cohesion in our country and overcoming the divisions that have arisen".
It was a veiled recognition of voter frustration with centrist politics, amid tensions over the influx of asylum seekers.
The Alternative for Deutschland (AfD) managed to secure 94 out of 709 seats in the German parliament.
Following a dismal result in Germany's September 24 election, the Social Democrats initially vowed not to enter another government with Merkel's conservatives, but they reconsidered their position after the long-time chancellor's attempts to form a coalition with two smaller parties collapsed.
Both the CDU and SPD suffered their worst election results for more than 50 years.
Even though leaders appear to have pulled off an agreement after their all-night session, the preliminary coalition agreement may yet fall apart. Merkel could also try to form a minority government, although she has said she favours new elections. The party, which is sticking to an opposition role, took 12.6 percent of the vote after vilifying Merkel for keeping Germany's border open to refugees.
Kevin Kuehnert, head of the Jusos youth branch of the SPD, told broadcaster ARD that a deal among coalition negotiators to drop Carbon dioxide emissions goals "was not a good start to these talks".
Merkel's conservatives and the SPD also agreed to raise the threshold for the top income tax rate of 42 percent to 60,000 euros ($72,000) a year from a current 53,700 euros, another source said.
Both sides then need to come to an actual coalition agreement, which would have to be approved in a ballot of the Social Democrats' entire membership. Mrs Merkel is not out of the woods yet. A collapse of talks, or negative SPD vote, would mean fresh elections and raise questions about Dr Merkel's political future.
Merkel ruled with the SPD in two of her three terms in office, including in the last parliament from 2013-2017. But Mr Schulz changed his mind after CDU coalition talks with the liberal Free Democrats (FDP) and Greens broke down.
The effort to form a government has already become post-World War II Germany's longest.