Former Italian president Giorgio Napolitano, a onetimecommunist who helped to steer his country through a debt crisis in 2011, died on Friday aged 98.

Condolences poured in from Italian Prime Minister Giorgia Meloni’s office, other politicians, the Vatican and beyond.

“I gratefully recall the personal meetings I had with him, during which I appreciated his humanity and foresight in making important choices with rectitude, especially at delicate times for the life of the country,” Pope Francis wrote in a telegram of condolences to Napolitano’s wife Clio Bittoni.

Napolitano forged a close relationship with the late Pope Benedict XVI, Francis’ predecessor, and was one of the few people to have been warned in advance of Benedict’s shock resignation in February 2013.

The Italian presidency is usually mostly ceremonial, but Napolitano used his powers in late 2011 to stave off crisis by naming the former European Commission technocrat Mario Monti to lead a government following the resignation of Prime Minister Silvio Berlusconi in a dispute over spending cuts.

Two years later, he broke another impasse when he installed a grand coalition under centre-left politician Enrico Letta after an inconclusive parliamentary election.

Napolitano became president in 2006 and was elected for an unprecedented second seven-year term in 2013. He stepped down in 2015, citing his age.

During a political career that started in the early 1950s, he was elected to the Italian and European parliament and served as interior minister and speaker of the lower house of parliament.