Greg Kelly, the former deputy of ousted Nissan chairman Carlos Ghosn, is seen in the car, as he leaves after being released from a detention centre in Tokyo, Japan, December 25, 2018.

Former Nissan executive Greg Kelly got a belated Christmas present as he was released from a Tokyo Detention Center overnight after being held for more than a month over corruption allegations.

Kelly was arrested along with Nissan Motor Chairman Carlos Ghosn as they arrived in Japan via corporate jet on Nov. 19. They were accused of a variety of financial misdeeds, including allegations that Kelly assisted his boss in hiding tens of millions in pay.

Though prosecutors in Japan normally have just 10 days to retain a suspect, they found a way to keep the two men in custody by raising new allegations. Kelly's attorneys finally convinced a court to end his detention, and the executive was released on 70 million yen ($633,699) bail. Ghosn remains in detention and won't have a chance for release until Jan. 1.

According to the Associated Press, Kelly, wearing a beige jacket and glasses, walked out of the detention center and into a waiting black vehicle, where he was seated next to his lead attorney. He was expected to be taken to a local hospital for treatment of a chronic neck problem.

In a video appeal for the one-time Nissan executive's release last week, Kelly's wife, Dee, said he suffered from stenosis, a condition in which the spinal cord is compressed and a person can suffer numbness or shooting pain.

"Release Greg and allow him to come home and have the surgery he needs," Dee Kelly said. "That is our family's Christmas wish."

Prosecutors attempted to retain Kelly, along with Ghosn, in custody, arguing they are flight risks. The court rejected that argument, but his release comes amid strictures on his movements. It is unclear how long Kelly will have to remain in the country. No trial date has yet been set.

Kelly did not comment to the crowd of reporters who had gathered outside the detention center to witness his release. He did issue a statement, however. "I believe my innocence will be revealed in the trial," he said. "I would like to have a judgment of non-guilty and restore my impaired reputation, and then return to my family as soon as possible."

The arrest of the two once high-flying executives took the auto industry by surprise. Ghosn had been credited with saving a near-bankrupt Nissan in 1999. He then knitted together an alliance with France's Renault. With the 2016 inclusion of a smaller Japanese automaker, the Renault-Nissan-Mitsubishi Alliance has become one of the top-three best-selling auto groups in the industry. But the arrests have revealed serious strains between the French and Japanese side of the alliance.

Some skeptics have gone as far as to suggest that corporate politics are playing a central role in the case. Nissan CEO Hiroto Saikawa has made it clear he opposed the full takeover of his company by Renault, which currently holds a 43.4 percent stake in the Japanese partner. Nissan, in turn, holds 15 percent of the French automaker's stock.

Japanese prosecutors have denied those allegations and have, in turn, been expanding the list of charges, particularly those facing Ghosn. He was originally accused of hiding about $36 million in income through 2015, while also misusing corporate funds for, among other things, the purchase of homes in Lebanon and Brazil.

Prosecutors added charges of breach of trust on Friday, allowing them to extend Ghosn's detention until at least Jan. 1. The government has not said if it will then try to continue his stay in custody. The latest charges allege Ghosn shifted personal trades to Nissan to cover losses of 1.85 billion yen ($16.7 million).

Ghosn has indicated through his attorney that he will hold a news conference following his own release and will stress his innocence.

If tried and convicted, Ghosn could face up to 10 years in prison on each of the corruption charges. Kelly faces similar penalties.