By Jeffrey Heller
JERUSALEM (Reuters) - The Israeli mayor of Jerusalem won re-election on Wednesday in a hotly contested race that dealt a political blow to his challenger's main backers, former Foreign Minister Avigdor Lieberman and the ultra-Orthodox Shas party.
Lieberman, a legislator whose far-right Yisrael Beitenu party is allied with Prime Minister Benjamin Netanyahu's Likud, is embroiled in a corruption case, with a court verdict next month likely to determine whether he returns to the cabinet.
The Jerusalem race, in which his mayoral candidate, Moshe Lion, failed to unseat incumbent Nir Barkat, had been an opportunity for Lieberman to flex some political muscle.
But in a snub to Lieberman, Netanyahu did not endorse Lion -and flew to Italy on Tuesday for talks with U.S. Secretary of State John Kerry after casting his ballot in Jerusalem.
Lion, a former aide to Netanyahu, took 45 percent of the vote to Barakat's 51 percent.
Palestinians, who form about a third of Jerusalem's 750,000 people, usually boycott the mayoral race in protest at Israel's control of the eastern part of the city captured in a 1967 war.
For Shas, the contest was a chance to demonstrate its electoral power and show it could induce a large bloc of ultra-Orthodox voters to rally behind Lion, its favored candidate.
Once a maker and breaker of coalition governments, Shas was not invited to join the one Netanyahu formed after a national election in January, handicapping its ability to channel public resources to its educational and social welfare institutions.
The party, which draws its supporters from Israel's working class Sephardic community of Jews of Middle Eastern origin, has been in flux since the death two weeks ago of its spiritual head, Rabbi Ovadia Yosef.
Shas's main political leader, Arye Deri, joined Lieberman in backing Lion, but failed to win support from ultra-Orthodox rabbis representing Ashkenazim, or Jews of European descent.
Barkat, 54, called the election "one of the most complicated and difficult races" he had seen, but thanked voters he said "gave us a mandate to lead the city with the same vision for the next five years".
A former high-tech tycoon, Barkat was first elected mayor in 2008 when he defeated an ultra-Orthodox leader in a contest that turned mostly on the city's sharp religious-secular divide. This time he won votes from secular and religious Israelis alike.
Though a political independent, Barkat championed Jewish settlement building in east Jerusalem in his first term, supporting Netanyahu's policies, yet was seen as more pragmatic than his opponent.
The Jerusalem contest was seen as the most strategic of nearly 200 local government elections held across Israel.
In Tel Aviv, Israel's commercial centre, Mayor Ron Huldai was the predicted winner of a fourth term of office, easily defeating Nitzan Horowitz, a dovish lawmaker who would have been the first gay mayor in the Middle East.
(Additional reporting by Allyn Fisher-Ilan)