Immigration is high on the agenda as Germany's Angela Merkel holds crunch coalition talks with her Bavarian conservative sister party, the CSU.
Mrs Merkel has acknowledged that coalition negotiations will be "difficult".
Under the face-saving compromise brokered on Sunday, sources told Reuters Germany would accept around 200,000 people a year on humanitarian grounds, including families of refugees already in Germany.
Her best shot now - if she wants to avoid fresh elections that could further boost the AfD - is an alliance with two other parties that make for odd bedfellows, the pro-business Free Democrats (FDP) and the left-leaning Greens.
In the talks to come all players will fight for ministerial posts and issues from European Union relations to climate policy.
At the same time, it said conservatives "should have the courage to represent the full spectrum of the party through new faces in government, the parliamentary group and party". She closed the door on another tie-up with the Social Democrats (SPD), her coalition partners for the past four years, who have announced their intention to go into opposition after slumping to their worst post-war result.
Merkel's CDU needs to reach a deal with the estranged CSU before both can jointly enter into talks with two smaller parties to form a coalition government a process some observers expect to last until Christmas if not the new year.
The Greens reject a cap on migrant arrivals that the Bavarian Christian Social Union (CSU) has been advocating in view of an influx of 890,000 migrants in 2015 and 280,000 in 2016, with many of them entering the country via Bavaria. She previously called them unconstitutional because the German constitution guarantees the right of asylum to those facing political persecution.
Merkel and the Greens have rejected the call by the CSU for a migrant cap but there are signs that conservatives could agree on different wording.
The conservative youth wing on Friday agreed on a "Dresden declaration" calling for change after the heavy election losses.
Even so, the issue is likely to cause difficulties with the Greens, who oppose any form of limitation on refugees numbers.
On euro zone reform, Merkel sounded skeptical on the idea of a finance minister for the currency zone. And "it's clear that hard negotiations lie ahead" with the FDP and Greens, she said.