© Gregor Fischer / DPA / Global Look Press
Chancellor Merkel
German MPs have approved Angela Merkel's candidature as chancellor. Merkel has thus secured her fourth term as the country's leader after months of political gambling.

The 63-year-old chancellor received 364 'yes' votes from members of her 'grand coalition', which comprises the CDU and CSU sister parties, as well as the Social Democrats. There were 315 votes against her, with nine abstentions.

"I accept the vote," Merkel said. Bundestag speaker Wolfgang Schaeuble replied, saying he wished Merkel "strength and success and God's blessing in accomplishing your great mission."

German media says 35 coalition MPs either voted against Merkel or abstained as the three parties occupy as many as 399 seats in the lower house (Bundestag). Merkel, who will lead the country for the fourth consecutive term, has to take a formal oath in front of federal president Frank-Walter Steinmeier later in the day.

Merkel has been leader of Europe's most powerful economy for over twelve years, having succeeded Social Democrat Gerhard Schroeder in 2005. But her political future seemed uncertain a few months ago, with some observers even predicting that 2017 would be her last year in power.

She won the general election in September 2017, but her party failed to garner an absolute majority in the parliament, prompting it to start looking for possible coalition partners. The Social Democrats (SPD), long-time allies of Merkel's conservatives, rejected the proposal and went into opposition.

Shortly afterwards, Merkel embarked on talks with the liberal, pro-business Free Democratic Party (FDP), with the Greens as alternative options. All of a sudden, the FDP slammed the door on exploratory talks last November. Its chairman, Christian Lindner, said his party would rather not be in the cabinet than submit to the terms of the proposed coalition accord.

In the middle of political limbo, Merkel's bloc was left with no other choice than attempt to relaunch coalition talks with the SPD, with the latter making a U-turn and opening itself to negotiations. But the process of reviving the negotiations went slowly, opening the way to snap elections.

At the end of January, Merkel started grand coalition talks with Social Democrats, led by outspoken Martin Schulz, former European Parliament president. The announcement coincided with news that the majority of Germans would vote against Merkel if snap elections followed.

Another survey held in January by German newspaper Bild revealed that if elections had been held back then, Merkel's conservatives would drop by three points and the Social Democrats by half a point. Such a result would put the SPD just two points ahead of the populist rightwing Alternative for Germany (AfD).

Finally, Merkel's bloc and Schulz's party had reached a preliminary agreement on a coalition deal, and the SPD began to vote on whether the party should enter a new alliance. Within the SPD, there was strong opposition to the deal as the party was at record lows in opinion polls. Many blamed their party's role in a 'grand coalition' from 2013 to 2017 for their worst performance since the end of World War II in the September election.

In early May, it was announced that some 66 percent of SPD members approved entering a coalition with Merkel's Christian Democratic Union (CDU) and its Bavarian sister party Christian Social Union (CSU). Almost 464,000 SPD members were eligible for voting, with a total of 378,437 having cast their ballot.

Now, after the Bundestag cleared the path for Merkel's fourth term, she would be the longest-reigning German chancellor since World War II, surpassing even Konrad Adenauer, the founder of post-war Germany.