German Chancellor Angela Merkel’s party has agreed an immigration policy with its sister party, media reports say.
The breakthrough in talks with the Christian Social Union (CSU) would overcome a major hurdle as Mrs Merkel’s Christian Democrats (CDU) seek to form a coalition government.
The CSU has called for a cap on refugee numbers and blamed Mrs Merkel for the rise of the nationalist AfD.
The AfD party entered parliament for the first time, with 12.6% of the vote.
It is increasingly seen as far-right in tone with its focus on immigration and Islam.
The CSU leader and Bavarian premier, Horst Seehofer, has called for migrant numbers to be restricted to 200,000 a year after Mrs Merkel allowed in 1.3 million mainly Middle Eastern migrants and refugees from 2015.
The Chancellor is opposed to caps but has said she does not want a repeat of the big influx seen at the height of the migrant crisis.
A deal between the CSU and CDU would pave the way for Mrs Merkel to pursue coalition negotiations with other parties.
The CSU lost votes to the AfD and its vote share fell by 10 percentage points to 38.8%.
The Bavarian party, which faces state elections next year, has developed a 10-point plan, seen as proposing a shift to the right, Germany’s ARD reports.
“We must fight the AfD hard, and fight for its voters,” the policy document says.
Before the election, Mrs Merkel governed in a grand coalition with the Social Democrats (SPD), but with her reduced majority and the SPD’s refusal to govern with her again, she must look elsewhere to form another government.
She is expected to approach the liberal, pro-business Free Democrats (FDP) and the Greens to win agreement on a so-called Jamaica coalition – the parties’ colours are the same as those of the Jamaican flag.
Correspondents say it may prove tricky to reconcile the opposing positions of the left-leaning Greens with those of the CSU and the FDP.
Mrs Merkel has acknowledged that coalition negotiations will be “difficult”.