Former billionaire Eike Batista arrives at the Federal Police headquarters to give a testimony in Rio de Janeiro, Brazil, January 31, 2017. REUTERS/Ueslei Marcelino

BRASILIA (Reuters) - Brazilian Supreme Court justice Gilmar Mendes ordered the release from jail of former mining and oil magnate Eike Batista, once the country’s richest man, ahead of his trial on corruption charges, the court said on Friday.

Batista has been jailed since Jan. 30 when he voluntarily returned to Rio from New York after four days as a fugitive. He is expected to stand trial along with an ex-Rio de Janeiro governor who allegedly took millions in bribes from the former billionaire.

The judge said that although grave, the crimes Batista stands accused of did not involve violence or threats to others and did not justify keeping the former tycoon in detention while legal proceedings advance.

Federal prosecutors accuse Batista, former governor Sergio Cabral and seven others of facilitating graft and hiding illegal funds in offshore shell companies.

Five years ago, Batista, 60, had a net worth exceeding $30 billion and ranked among the world’s 10 richest people.

Prosecutors said Batista paid $16.5 million to the ex-Rio de Janeiro governor for his businesses to win lucrative government contracts.