RIO DE JANEIRO, Jan. 25 (Xinhua) -- A Brazilian court on Thursday ordered former President Luiz Inacio Lula da Silva to hand over his passport and not to leave the country.

The decision came a day after an appeals court rejected Lula's appeal against a lengthy prison sentence for corruption after the ex-president was found guilty of having received illegal benefits from the state oil company Petrobras.

Judge Ricardo Leite, from the 10th federal court in the federal capital of Brasilia, ordered the seizure of Lula's passport. He said that the decision was not related to Lula's corruption charges or his prison sentence.

Lula was planning a trip to Africa on Friday, where he was set to participate in a meeting with global leaders in Ethiopia to discuss efforts to eradicate famine on the continent.

Leite's ruling came as Lula faced another case in which he is accused of using his influence to help the Brazilian air force buy jet fighters from Sweden.

Despite these setbacks, Lula on Thursday was named a presidential candidate by his Workers' Party.