Italian head of state Sergio Mattarella was re-elected for a second term on Saturday, with party chiefs asking him to carry on after a week of fruitless, often fraught voting in parliament to choose a successor.
Relieved party chiefs thanked 80-year-old Mattarella for agreeing to remain, but the failed attempts to replace him during seven rounds of balloting have left deep scars, with potentially dangerous repercussions for political stability.
Nonetheless, financial markets are likely to react positively to the status quo, which will see Prime Minister Mario Draghi, who had made clear he hoped to become president himself, continuing as prime minister instead.
Draghi said in a statement that Mattarella's re-election was "splendid news for Italians," thanking him for "his decision to go along with the extremely strong will of parliament".
Pope Francis sent the re-elected president a telegram of congratulations.
At the eighth round among more than 1,000 lawmakers and regional delegates in the Chamber of Deputies, loud and prolonged applause broke out when Mattarella passed the 505 votes needed for election.
He had previously ruled out remaining in office, but with the country's political stability at risk he changed his mind in the face of appeals from parliamentary leaders who met him at his palace earlier in the day.
In brief comments from the palace, Mattarella said the ongoing coronavirus crisis and Italy's difficult economic and social conditions meant he was duty bound to accept the decision of parliament.
He said that even though he had had other personal plans, he was "committed to matching the expectations and hopes of the people".
In Italy's political system, the president is a powerful figure who gets to appoint prime ministers and is often called on to resolve political crises. Governments in the euro zone's third-largest economy survive around a year on average.