Former Brazilian President Luiz Inácio Lula da Silva was released for the funeral of his grandson.
The seven-year-old died on Friday of a meningitis, and the detained ex-leader may go to the funeral in Sao Paulo on Saturday.
Lula was sentenced to 1
The ex-leader says his conviction is politically motivated.
An iconic figure of the left in Latin America, the former trade unionist led Brazil between 2003 and 2010.
But he was convicted of his work on a beach property, and in February a court doubled Lula's sentence after he was found guilty, Renovation work by a company involved in a corruption scandal.
His lawyers said he would appeal the new conviction.
- Lula: Judge Holds Me Out of the Choice
- A Brief Overview of the Brazilian Scandals
Lula asked for permission to attend his brother's funeral in January The Supreme Court of the country granted the request only after the funeral ,
However, the government of the state of Paraná said that Lula is allowed to attend the funeral of his grandson Arthur in Sao Paulo.
Arrangements are made to take him to the city, which is about 340 kilometers away.
The former leader is currently detained in a federal prison in Curitiba, the state capital of Paraná. This is his first time since his conviction last April.
Lula was the most well-known conviction from a far-reaching anti-corruption investigation known as the "Operation Car Wash," described by the US Department of Justice as "the biggest foreign bribery case in history."
His followers have claimed he is a victim of political persecution, and his leftist workers' party asked for his release.
President Jair Bolsonaro said he hopes Lula will "rot" in a video ad in October.