Berlin, July 1 (DPA) Christian Wulff was elected Wednesday as Germany’s new president, after three tense rounds of voting questioned the authority of Chancellor Angela Merkel’s ruling coalition.

Wulff, who is state premier of Lower Saxony, won 625 of 1,244 votes in the specially convened Federal Assembly, after it was forced into a third round in which it was enough to win more votes than any other candidate.

The presidency became vacant after the unexpected resignation of Horst Koehler May 31.

The election was a nail-biting test for Merkel, after her allies failed to unite behind Wulff in the initial round of voting, when 44 members of her centre-right delegation did not back him – far more than she had expected.

Wulff clawed back 15 ballots in the second round, but the 615 votes fell short of the required absolute majority and excited hopes in the opposition of a last-minute upset and a victory for their candidate, Joachim Gauck.

Gauck, a popular former East German anti-communist icon who was nominated by the Social Democrats (SPD), won 494 votes in the final round of balloting.

The Left Party withdrew their candidate Luc Jochimsen before the final round, opening the possibility of their 124 members backing Gauck.

However the radical left-wing party could not unite in support of the opposition candidate and several members decided to abstain, effectively clearing the way for Wulff’s victory.

A total of 121 members of the federal assembly abstained in the final round of the secret ballot.

Wulff’s eventual success came after Merkel has struggled in recent months to end feuding within her coalition of Christian Democrats (CDU/CSU) and Free Democrats (FDP), and has lost several high-profile allies, including Koehler.

The Federal Assembly, which has the sole purpose of electing the president, consists of the lower house of parliament and a matching number of representatives picked by Germany’s 16 federal states.

To win, a candidate must obtain an absolute majority on the first or second ballot, or a plurality on a third ballot.

On paper, 644 members of the college were Merkel loyalists from her own CDU, the Bavaria-only Christian Social Union (CSU) or the junior coalition partner, the FDP.

Ahead of the election, Merkel loyalists had played down the significance of only succeeding in a third round of voting. Former presidents Gustav Heinemann and Roman Herzog also required a third ballot.

In the event, the final outcome for Wulff constituted an absolute majority, meaning he would have won in the first round if he had achieved 625 votes at the start of the day. His failure to do so was interpreted as disgruntlement with Merkel’s government amongst centre-right ranks.

A fourth candidate, songwriter Frank Rennicke, also withdrew before the final round. He was only backed by the 3 votes of the far-right National Democratic Party (NPD), which nominated him.

Wulff, a CDU career politician, must immediately renounce his post as a state premier before he can be appointed president. Aged 51, he is the youngest person yet to hold the post. He is in his second marriage and has a son aged two.