Carlos Ghosn’s lawyers posted a US$4.5 million bond to secure his release from a Tokyo prison for the second time, giving the deposed auto titan a chance to prepare his defense against charges of funneling millions of dollars from Nissan Motor Co. through an intermediary for his own purposes.

A court set Ghosn’s 500 million-yen bond earlier in the day with three conditions: that he live at a registered domestic address, that he not leave the country, and that he adhere to requirements meant to prevent the destruction of any evidence related to the case and other conditions.

Prosecutors appealed the court’s decision, broadcaster TV Asahi reported. Ghosn was detained for a second time on April 4, cutting short almost a month of freedom after previously paying US$9 million in bail. Authorities said they detained him again because they believed he might destroy evidence in a case stretching back to his first arrest in November. Ghosn has proclaimed his innocence on all charges.

“The only justification for keeping him in detention are that he will flee or destroy evidence,” Stephen Givens, a professor of law at Sophia University in Tokyo, said before Ghosn’s latest bail decision. “After the first two indictments he was able to put together a set of conditions that told the court he wasn’t likely to flee.”

The latest indictment against Ghosn was filed April 22. Using foreign corporate entities in 2017 and 2018, Nissan lost US$5 million that was funneled into accounts controlled by Ghosn, prosecutors said. Those constitute the most serious allegations yet against the former chairman who once led the global alliance between Nissan, Renault SA and Mitsubishi Motors Corp.

The court “has given approval for Mr. Ghosn to meet his wife at the detention center, which means he didn’t break any regulations during his last bail,” said Nobuko Otsuki, a Tokyo-based defense lawyer who’s not involved in the case.

The pending release will allow Ghosn to return home and work with his lawyers for his upcoming trial, which may start later this year or next year. Ghosn refuted the latest charges, saying prosecutors were “aided and abetted by certain Nissan conspirators.”

Nissan reissued the same statement it made during previous developments in the Ghosn case, saying it cannot comment on judicial decisions or processes but that its own investigation found “substantial evidence of blatantly unethical conduct” by Ghosn and former right-hand-man Greg Kelly, who remains free on bail after being arrested along with Ghosn in November.

After Ghosn’s first arrest, Nissan and Renault uncovered payments made through companies in Oman and Lebanon that allegedly were used for Ghosn’s personal benefit, including a yacht and his son’s startup. One company, Beirut-based Good Faith Investments, made money transfers to a firm connected to Anthony Ghosn, people familiar with the matter said.

Ghosn’s first arrest shook the auto alliance to its core. Since then, the three companies adopted a new governance structure designed for smoother and more equitable decision-making.

Nissan, which swiftly removed Ghosn as chairman days after his first arrest, is seeking to move past the tumultuous chapter. The Yokohama-based automaker is on track to miss its full-year profit goal, earning less than partner Renault for the first time in a decade.

The Japanese carmaker on Wednesday slashed its preliminary operating profit for the second time to 318 billion yen for the year ended March, from 450 billion yen. It cited higher costs related to U.S. warranties, an “adverse operating environment” and the “impact of recent corporate issues on sales.”

Before his latest arrest, Ghosn recorded a video in which he argued that Nissan executives either signed off on his actions or were conspiring against him because they feared losing their jobs if the company moved closer to Renault. He also criticized current executives for not fixing the company’s poor performance.

“I’m worried because obviously the performance of Nissan is declining, but also I’m worried because I don’t think there is any vision for the alliance being built,” Ghosn said in the video, which was released after his latest arrest.