Leaders of German Chancellor Angela Merkel’s conservative Union bloc and the center-left Social Democrats agreed early Friday on the basis to move ahead with coalition negotiations, after marathon overnight talks.

Merkel’s Christian Democratic Union, the Bavarian-only Christian Social Union and the Social Democrats produced a 28-page document outlining their compromise positions on a wide range of issues, including taxes, migration and health care.

“Many, many hours of work, serious wrangling and shaping are contained in these 28 pages,” tweeted CDU lawmaker Julia Kloeckner, part of Merkel’s negotiating team.

Social Democrat spokesman Serkan Agci told reporters outside his party’s headquarters, where the talks took place, that there had been a “breakthrough” agreed upon by the party leaders but said final revisions were still being made on the document by negotiating teams, which would also need approval.

Details were to be announced later Friday, but according to a draft copy the sides agreed to keep the top tax rate at 42 percent rather than raise it to 45 as the Social Democrats had wanted, and to limit the number of migrant family members who will be allowed to join asylum seekers in Germany, as well as the overall number of migrants allowed in the country each year, the dpa news agency reported.

They also agreed to several issues pushed by the Social Democrats, including stabilizing pension payments, increasing money for families with children, better financing of daycare and free kindergartens, dpa reported. The paper also calls for increased German financing for the European Union so that it can strengthen its institutions.

The final negotiating session between the sides began Thursday morning and participants, who had already worked all week, worked through the night to come to the agreement.

Despite the agreement, the possibility of a new coalition of Merkel’s bloc with the Social Democrats, as governed Germany in the outgoing government, is still far from a done deal.

Among other things, the Social Democrats’ leaders will still have to sell entering coalition talks to a party conference, and face much resistance. The sides then need to hash out the actual coalition agreement, which would have to be approved in a ballot of the Social Democrats’ entire membership.

Still, had this week’s talks failed, Merkel’s only options would have been to form a minority government or hold new elections.

Following a dismal result in Germany’s Sept. 24 election, the Social Democrats initially vowed not to enter into another government with Merkel’s conservatives, but reconsidered their position after the long-time chancellor’s attempts to form a coalition with two smaller parties collapsed.

German President Frank-Walter Steinmeier appealed to the negotiators Thursday to consider their responsibility toward Europe, not just their own parties and political futures.

This article first appeared in our sister title USA Today.