The newly elected parliament must hold its inaugural session no later than 30 days after the election, on October 26
Germany votes Sunday in the first election not to feature Angela Merkel in over a decade, but it may be some time before it becomes clear who will succeed her as chancellor.
The chancellor is not directly elected, but chosen through a vote in the Bundestag, the lower house of parliament, after a government has been formed -- meaning Merkel could still remain in her post for weeks if not months.
After years of two-party coalitions, three parties will likely be needed this time to achieve a majority -- common in Germany's regional parliaments but not seen at the national level since the 1950s.
In most parliamentary systems, the head of state nominates a party to form a government -- usually the party that has won the biggest share of the vote.
But in Germany, all parties can embark on what are known as "exploratory talks".
Also Read - What is at stake in Germany's election?
In this initial phase, which has no time limit, there is nothing to stop the parties from all holding coalition talks in parallel -- though tradition dictates that the biggest party will invite smaller ones for discussions.
The Greens have already called a party congress for Saturday October 2, during which they could decide with whom they would take up exploratory talks.
"Whoever ends up with a majority in the Bundestag will become chancellor," Armin Laschet of Merkel's CDU-CSU conservative alliance said last week -- suggesting that the second-placed party could also open negotiations.
Discussions will begin as soon as the results are in, with the parties looking to discover each other's red lines and establish whether they can work together.
On Monday, the day after the election, the parties will hold leadership meetings. The newly elected MPs from each party will also hold their first meetings next week, with the SPD and CDU-CSU planning to convene on Tuesday.
The newly elected parliament must hold its inaugural session no later than 30 days after the election, on October 26.
Thrashing out details
If two or three parties agree in principle that they would like to form an alliance, they must then begin formal coalition negotiations, with various working groups meeting to thrash out policy issues.
At the end of these negotiations, the parties decide who will be in charge of which ministry and sign a coalition contract, a thick document setting out the terms of the agreement.
This phase also has no time limit, with the outgoing government holding the fort in the meantime.
The parties then nominate who they would like to be chancellor before the official vote in the Bundestag.
After Germany's last election on September 24, 2017, Merkel was formally confirmed chancellor in a coalition between the CDU-CSU and the centre-left Social Democrats (SPD) only on March 14, 2018.
According to Article 63 of the German constitution, the head of state must propose a potential chancellor to the Bundestag.
If no cross-party alliance emerges, President Frank-Walter Steinmeier of the SPD may still nominate a potential chancellor, most likely from whichever party won the biggest share of the vote.
The parliament will then vote in a secret ballot, with the candidate needing an absolute majority.
If this is not achieved, a second vote will be held two weeks later. If there is still no absolute majority, there is then an immediate third vote in which a relative majority is enough.
The president then decides whether to appoint the chancellor as head of a minority government, or to dissolve the Bundestag and call new elections.
This worst-case scenario was narrowly avoided in 2017: faced with an impasse in negotiations, Steinmeier urged the parties to meet again, pushing for the renewal of the so-called grand coalition.