Italian President Sergio Mattarella has agreed to serve a second term after coalition parties failed to agree on a compromise candidate for the office.
The 80-year-old emerged as the most popular choice after six days of often tense voting in Rome.
He had expressed a desire to leave office, but local media reported Prime Minister Mario Draghi had convinced him to stay for the "stability" of Italy.
He was formally re-elected on Saturday, following an eighth round of voting.
Speaking after Saturday evening's vote, Mr Mattarella that he felt a "sense of responsibility" to remain in office in light of the health and economic challenges facing the country.
The former Constitutional Court judge added that "duty to the nation must prevail over my own personal choices".
Mr Draghi hailed Mr Mattarella's re-election, calling it "splendid news for Italians".
"I am grateful to the president for his decision to go along with the extremely strong will of parliament to re-elect him for a second term," he added.
The parties in Italy's governing coalition agreed to re-elect Mr Mattarella after seven rounds of voting failed to produce an alternative candidate and revealed deep divisions in the cabinet.
Italy's presidency is elected through a secret vote in an electoral college of 1,009 senators, MPs and some regional delegates, with the first candidate to receive two-thirds of the vote declared victorious. In the event, the incumbent received 759 votes.
Mr Mattarella emerged as the compromise candidate after many lawmakers abstained from voting and candidates put forward by the governing parties failed to gather enough support.
Antonio Tajani, national co-ordinator for the centre-right Forza Italia party, told the BBC that support for Mr Mattarella was the only proposition most MPs agreed on.
"Mattarella has performed his function impeccably," Mr Tajani said. "In the absence of a political agreement on other people, it is right that the point of balance is still him."
It is unclear whether the 80-year-old intends to serve a full seven-year term, with some in Italy suggesting that he could step aside to allow Mr Draghi to take his place after Italian elections in 2023.
Fear of instability and lack of imagination
Sergio Mattarella has been a highly respected and popular president for his seven-year term – but was absolutely clear that he did not want another.
Yet after failing to unite around an alternative candidate, Italy's parliamentarians have voted for him to remain.
Many MPs had feared instability and snap elections if Mr Mattarella had been replaced by, for example, the current prime minister, with some worried they'd be voted out and lose their generous pensions.
This will be seen by critics as an embarrassing show of Italy's political divisions and the lack of imagination of its MPs to think beyond the status quo.
Several had spoken of the need to elect a woman president for the first time; others of going for a younger figure in a country often lamented as a gerontocracy.
But they couldn't, they didn't – and ultimately Sergio Mattarella, as competent as he is, will now have to stay at the Quirinale Presidential Palace much longer than he'd intended to.
The Italian presidency is a largely ceremonial role, though its power to grant the dissolution of parliament, choose new prime ministers and deny mandates to weak coalitions means it takes on great power during times of political crisis.
In recent years, as Italian politics has become more fragmented, the role has become increasingly important and Mr Mattarella has been praised by many in Italian politics as a stabilising influence at a time where several governing coalitions have collapsed.
Last year, he stepped in to avert another political crisis caused by the resignation of Prime Minister Giuseppe Conte over the country's response to coronavirus and appointed Mr Draghi in his pace.
Mr Mattarella said at the time that Italy needed a "high-profile government" to tackle the Covid-19 pandemic and the worst economic crisis in decades.
Berlusconi seeks comeback role as Italian president
- 21 December 2021
Italy turns to Draghi to fix government stalemate
- 3 February 2021
Mario Draghi 'to form new Italian government'
- 2 February 2021