Former Brazilian President Luiz Inácio Lula da Silva was granted leave from prison to attend his grandson’s funeral.
The seven-year-old died of meningitis on Friday, and the jailed ex-leader was allowed to go to the burial in Sao Paulo on Saturday, where supporters gathered to greet him.
Lula, as he is known, is serving 12 years in prison on corruption charges.
The ex-leader says his conviction was politically motivated.
An iconic figure for the left in Latin America, the former trade unionist led Brazil between 2003 and 2010.
But he was convicted for work done on a beach front property, and in February a court doubled Lula’s sentence after he was found guilty of benefiting from renovation work from a company implicated in a corruption scandal.
His lawyers said he would appeal against the new conviction.
Lula had asked permission to attend his brother’s funeral in January, but the country’s Supreme Court did not grant the request until the funeral was under way.
However, Paraná state government said Lula would be allowed to attend his grandson Arthur’s funeral in Sao Paulo.
Arrangements were made to fly him to the city, roughly 340 kilometres (211 miles) away.
The former leader is currently jailed in a federal prison in Curitiba, capital of Paraná state. This is his first time out after his conviction last April.
Lula’s was the most high-profile conviction from a sprawling anti-corruption investigation known as Operation Car Wash – dubbed “the largest foreign bribery case in history” by the US Department of Justice.
His supporters have insisted he is the victim of political persecution, with his left-wing Worker’s Party petitioning for his release.