The former president of Brazil, Luiz Inácio Lula da Silva, thanked Pope Francis for his solidarity on Wednesday, after his prison sentences were annulled.

Lula was serving a 12-year sentence for corruption and money laundering. According to the BBC, the ex-president was also sentenced 17 years on another charge and a third case is yet unresolved.

"I want to thank Pope Francis (@Pontifex_pt) that when I was in prison he made a point of sending me a letter. And for having me at the Vatican as soon as I left prison for a conversation about combating hunger and inequality," the former Brazilian president wrote on Twitter March 10.

The BBC reported March 8 that Federal Supreme Court Justice Edson Fachin nullified all the convictions handed down against Lula by the federal court in Paraná state, which was part of the anti-corruption investigation Operation Car Wash.

The Attorney General's Office said it will appeal Fachin's ruling, "which would take the individual decision of the magistrate to the plenary session of the 11 member Supreme Court, or to the Second Chamber of the (Supreme) court, which would have to uphold or reverse this Monday's ruling," the BBC stated.

The Supreme Court ruling by Fachin said the lower federal court in Paraná did not have legal jurisdiction to try those cases.

According to Infobae, Lula served 580 days in prison.

Pope Francis wrote a letter to Lula in May 2019, in response to a letter from the former president. In the letter, the Holy Father explained the importance of understanding politics as a form of charity and encouraged the former president in the face of the "difficult trials" he had experienced, such as the death of his wife Marisa Leticia, his brother Genival Inácio, and his seven-year-old grandson Arthur.

The Roman Pontiff also encouraged Lula to respect human life and freedom, and exhorting the politician to trust in Christ.

Lula was imprisoned for 19 months in Curitiba, the capital of Paraná state. He was released Nov. 9, 2019 after the Supreme Court voided a norm established in 2017 that stipulated that defendants should be jailed as soon as they were sentenced by a lower court of appeals. Now, to go to prison the sentence must be final without further appeal to a higher court.

In February 2020, Pope Francis received Lula in a private audience at the Vatican in a meeting that lasted approximately one hour.

On that occasion, diplomatic sources told ACI Digital, CNA's Portuguese language news partner, that the reason the meeting was not listed on the pope's schedule was because Lula, visited the Roman Pontiff as a private citizen and not as a former president.

Lula is an influential figure in Brazil, despite his incarceration. The founder of Brazil's first major socialist party, he was the country's president from 2003 until 2010.

He led Brazil during a period of significant economic growth and significantly expanded social welfare programs for the poor. However, his administration was controversial among Catholics, especially because of his support for legally protected abortion and for an increasingly secularized approach to problems related to marriage and the family.