German election: Merkel vows to win back right-wing voters
German Chancellor Angela Merkel has said she wants to win back the voters who deserted her party for right-wing nationalist AfD.
Mrs Merkel is set for a fourth term in office, despite heavy losses for her party in Sunday's election.
She now faces months of coalition talks to try to form a stable government.
After winning its first parliamentary seats, AfD - Alternative for Germany - vowed to fight "an invasion of foreigners" into the country.
"We want a different policy," co-leader Alexander Gauland said following his party's historic surge.
But splits have already emerged between AfD leaders on the party's direction.
There were surprising scenes at the party's news conference on Monday morning when chairwoman Frauke Petry, the best known AfD politician, announced she would not be part of the party's bloc when she joined the Bundestag.
Mrs Merkel's conservative alliance - between the Christian Democratic Union (CDU) and its sister Bavarian party, the Christian Social Union (CSU) - recorded its worst result in almost 70 years.
What are the coalition options?
Mrs Merkel's conservative alliance has the largest number of seats and will form the next government - as the left-leaning parties together do not come remotely close to a parliamentary majority.
As working with AfD MPs would be unthinkable, and the second-placed Social Democrats (SPD) has apparently ruled itself out, the most likely scenario is a "Jamaica" coalition, so-called because of the colours of Jamaica's flag and the traditional colours of the German political parties.
Such a coalition - which has never been tried at the federal level - includes the black CDU/CSU, the yellow, business-friendly Free Democrats (FDP) - who are returning to parliament after a four-year hiatus with 80 seats - and the Greens (67 seats).
This combination could lead to prolonged horse-trading, as the Greens and FDP disagree on key policy issues.
Martin Schulz, who leads the SPD, has vowed to prevent AfD from being the main opposition party and enjoying certain privileges as a result. He insists his party will not enter another coalition with the conservatives.
But the SPD's stance has been criticised by other parties. The FDP's Christian Lindner said the Social Democrats' "rash and sudden decision to stay in the opposition in parliament is irresponsible".
The liberal FDP has been in government for more of Germany's post-war history than any other party. After failing to win any seats in 2013, it has re-entered the Bundestag and will have 80 MPs.
The Greens, who increased their representation to 67 MPs, said they were "deeply troubled" by the AfD being in parliament.
Regarding possible coalition talks, co-leader Katrin Göring-Eckardt said "negotiations between these four parties will be tough."
How the vote could affect Brexit
Gavin Lee, BBC News, Berlin
In private, UK ministers say they expect the FDP to be helpful in Brexit talks because of some favourable rhetoric given by its leader. Christian Lindner has said he believes the tough tone from Berlin and Brussels to deter other potential leavers has been wrong.
He told Politico: "We have an interest in a strong and economically prosperous Britain." This is a different tone to other, more federalist parties, including Angela Merkel's CDU.
Mr Lindner may become the next German foreign minister but senior CDU MPs say they do not believe he would have much influence on the talks.
Professor Norbert Lambert, President of the Bundestag, told me that EU solidarity was an absolute priority for Angela Merkel, and that even with new faces in the coalition and cabinet, she would not allow for any "divide and conquer" tactics from Britain.
On Monday the chancellor said she had wished for a better result in general.
"We have started to analyse the voters we lost, especially with regards to those who went on to vote for the AfD, we want to get them back by good politics and addressing some of the issues," Mrs Merkel said.
She said her party would speak to the liberal FDP and the Greens "but also the SPD, as we governed together for a long time and it's always important to keep talking".
Why did AfD gain support?
The party, which only formed four years ago, is expected to take 94 seats in the 709-seat federal parliament as the third-largest grouping.
AfD's campaign capitalised on a backlash over Mrs Merkel's decision to open Germany's borders to undocumented migrants and refugees in 2015, mainly from the Middle East.
Its success has shocked Germany's political establishment, and protests against the anti-Islam party have been held in several cities following the election result.
Alternative for Germany began as an anti-euro party but later turned its focus to immigration and Islam.
It called for a ban on minarets and declared Islam incompatible with German culture. Several of its candidates have been linked to far-right remarks.
Its election campaign posters carried messages such as "Stop Islamisation. Vote AFD" alongside images of women wearing burkas, and "Burkas? We like bikinis".
It performed particularly well in what was formerly East Germany, taking 21.5% of the vote as the second most popular party.
In Saxony, AfD narrowly beat the CDU to come out on top with 27% of the vote. According to analysis by broadcaster ARD, the AfD vote was highest among 35-44 year-olds, at 16%, and lowest among those above the age of 70, at 7%.