German Chancellor Angela Merkel's conservatives have agreed to enter a coalition with the centre-left Social Democratic Party (SPD), officials say.
The late-night decision follows lengthy discussions between leaders of the SPD and Mrs Merkel's Christian Democrats (CDU) and the allied CSU.
Her CDU fell just short of an outright majority in September's election, when its liberal partner won no seats.
Under the deal, the SPD gets a minimum wage and a lower retirement age and Chancellor Merkel's Christian Democrats get agreement that taxes will not rise.
The broad thrust of German policy is unlikely to change. The new government will balance its spending against incomes.
One intriguing policy is an agreement to introduce higher road tolls on foreign drivers. It is not clear how that would work or whether it would fall within European law.
The agreement has to be ratified by the membership of the SPD but the leadership will sell it as a real improvement in the lives of Germany's increasingly numerous low-paid workers.
It may also strengthen Chancellor Merkel's position on Europe. In the past, she has had to get agreement within the Bundestag for German participation in bail-outs via a debate and a vote on the floor of the Bundestag. In future, she will have the overwhelming majority a cross-party grand coalition brings.
The final coalition deal will now go to a ballot of SPD members to be signed off.
Mrs Merkel is expected to present the agreement alongside CSU leader Horst Seehofer and the SPD's Sigmar Gabriel on Wednesday morning.
Parties reached settlements on issues including a minimum wage, a lower retirement age, and changes to dual citizenship rules.
As a result, a nationwide minimum wage of 8.50 euros ($11.55, £7.11) could come into force from January.
The parties also agreed that there would be no tax increases, a key demand of the CDU/CSU.
This time around, the partnership faces the twin tasks of rebalancing the eurozone's biggest economy and winning the support of the German public to tackle the eurozone's debt and banking problems.
At the election on 22 September, the CDU took about 41.5% of the vote, the SPD won 26%, the Greens 8.4%, and the former communist Left Party 8.6%.
The CDU's previous coalition partner, the Free Democrats, narrowly failed to cross the 5% threshold for entering parliament.