Israel's parliament on Tuesday elected Reuven Rivlin, a far-right member of the ruling Likud party, to be the nation's 10th president when Shimon Peres steps down next month.
Known for his affable character and quirky sense of humour, the 74-year-old former parliamentary speaker will take over when Peres retires at the end of July, drawing a line under what many regard as a golden age of the presidency.
A lawyer by profession, Rivlin has won widespread support from across the political spectrum for his determined defence of democracy and civil rights.
But his political outlook is diametrically opposed to that of Peres, being a firm opponent of a Palestinian state and a keen backer of the settlements.
And he will have a tough act to follow, with Peres's charisma and global standing enabling him to transcend the largely ceremonial position of the presidency and use it to promote a political message of peace.
Announcing the results of a run-off vote, parliamentary speaker Yuli Edelstein said Rivlin had defeated his centrist challenger Meir Sheetrit by 63 votes to 53 in a secret ballot of the Knesset's 120 MPs.
The other three candidates, former politician Dalia Itzik, retired Supreme Court justice Dalia Dorner and chemistry Nobel Laureate Dan Shechtman were all eliminated in a first round of voting.
- Bitter pill for Netanyahu -
In a televised joint news conference, Prime Minister Benjamin Netanyahu, whose bitter dislike of Rivlin made headlines in the weeks running up to the vote, offered Rivlin his congratulations.
"I want to wish you great success," said the premier who had only begrudgingly backed his party's candidate at the 11th hour after his well-publicised and frantic efforts to find an alternative failed.
"You have two main missions facing you: to unite all the people... and to represent Israel to the world," he said.
In an emotional acceptance speech punctuated by puns, but delivered in a voice which at times broke with emotion, Rivlin said he was no longer a man of politics but of the people.
Signup to our newsletter and follow us on Facebook and Twitter!
"I am no longer party man but a man of all the people," he said before joining in a champagne toast led by the speaker.
Congratulations poured in.
"Today is a festive day!" said a beaming Naftali Bennett, head of the far-right Jewish Home party who is ideologically very close to Rivlin.
"Israel has gained a nationalist, Zionist president who loves the land of Israel and the people of Israel, a president who believes in the right of the people to its land and isn't afraid of saying it."
Defence Minister Moshe Yaalon praised his "Jewish and democratic values".
"Rivlin... will be an important element in connecting with different strata of society, bringing people together, and in the uncompromising struggle against violence, xenophobia and racism against anyone who is different," he said.
- 'Greater Israel's president' -
But many Israeli commentators were sanguine about Rivlin's political bent and what he would use the presidency to try to achieve.
"Rivlin is far to the right of the clear Israeli consensus, he is opposed to the two-state solution, he is an out-and-out supporter of the settlement enterprise on both sides of the separation fence," commentator Ben Caspit wrote in Maariv on Tuesday.
Commentator Ari Shavit wrote in Haaretz newspaper last week that Rivlin would "exploit the presidential institution to advance the West Bank settlement project, which he worships, and the one-state solution he believes in."
Peres, the last surviving member of Israel's founding fathers, is due to wrap up his seven-year term at the end of July, just a week shy of his 91st birthday.
Commentators say his departure is likely to switch the presidency's focus from international affairs to more domestic matters.