JERUSALEM (AP) -- Isaac Herzog, a veteran politician and the scion of a prominent Israeli family, was elected president Tuesday, a largely ceremonial role that is meant to serve as the nation's moral compass and promote unity.
The anonymous vote was held among the 120 members of the Knesset, or parliament. Herzog will be Israel's 11th president, succeeding Reuven Rivlin, who is set to leave office next month after seven years in office.
Herzog, 60, is a former head of Israel's Labor Party and opposition leader who unsuccessfully ran against Prime Minister Benjamin Netanyahu in the 2015 parliamentary elections.
He comes from a prominent Zionist family. His father, Chaim Herzog, was Israel's ambassador to the United Nations before being elected president. His uncle, Abba Eban, was Israel's first foreign minister and ambassador to the United Nations and United States. His grandfather was the country's first chief rabbi.
Herzog defeated Miriam Peretz, 67, an educator who was seen as a down-to-earth outsider close to the country's dominant conservative and nationalist political camp.
Herzog has served as head of the Jewish Agency, a nonprofit that works closely with the government to promote immigration to Israel, for the past three years since resigning from parliament. He was widely seen as the favorite because of his deep ties to the political establishment. He will hold office for a single seven-year term starting July 9.
The president is tasked with tapping a political party leader to form governing coalitions after parliamentary elections. Israel has held four national elections in the past two years amid a protracted political crisis.
Netanyahu's opponents faced a midnight deadline Wednesday to put together a new coalition government. If they fail, the country could be plunged into another election campaign.
The president also has the power to grant pardons -- creating a potentially sensitive situation as Netanyahu stands trial for a series of corruption charges.
Peretz immigrated from Morocco as a child and has worked as a teacher, educator and lecturer on Judaism, Zionism and grief. Two of her sons died serving in the Israeli military. In 2018 she was awarded the Israel Prize, the country's top award, for lifetime achievement.
She would have been the first woman and the first settler to hold the office.
She and her family lived in one of Israel's settlements in the Sinai Peninsula until a peace treaty was struck with Egypt in 1979 and the territory was returned. Peretz then moved to the settlement of Givat Zeev, in the occupied West Bank just north of Jerusalem.
Most of the world considers Israel's West Bank settlements illegal under international law and an obstacle to peace with the Palestinians, who seek the territory as part of a future state.