Israel's parliament has elected former centre-left politician Isaac Herzog as the country's president, a role that is largely ceremonial but also meant to promote unity among ethnic and religious groups.

Mr Herzog beat rival candidate Myriam Peretz, an educator and mother of two Israeli infantry officers killed in battle, by a vote of 87 to 26.

He will assume the presidency next month, replacing Reuven Rivlin, who is ending his seven-year term.

Mr Herzog, a lawyer, is a son of the late Israeli president Chaim Herzog, who also served as his country's ambassador to the United Nations.

Chaim Herzog was born in Belfast and spent his childhood in Dublin. His father was the first chief rabbi of Dublin.

First elected to parliament in 2003, Isaac Herzog, 60, went on to lead the Labour party and hold several portfolios in coalition governments. His most recent public post was as head of the Jewish Agency for Israel, which encourages immigration.

Defeated by Prime Minister Benjamin Netanyahu in a 2015 national ballot, Mr Herzog was picked as president as Mr Netanyahu faced possible toppling by a cross-partisan alliance of challengers.

"It is essential, really essential, to tend to the open wounds that have been opened in our society recently," Mr Herzog said in parliament, accepting the appointment.

"We must defend Israel's international standing and its good name in the family of nations, battle anti-semitism and hatred of Israel, and preserve the pillars of our democracy."

From the Archives: President Of Israel Recalls Irish Civil War

Mr Herzog is popularly known by his childhood nickname "Bougie", a combination of the Hebrew word for doll "buba" and a word for toy used by French children, "joujou".