In a surprise move, a court in Japan has rejected a request to extend the detention of Nissan's former chairman Carlos Ghosn, paving the way for his release.

Mr Ghosn has been charged with financial misconduct - accused of under-reporting his pay package over a five-year period.

He was arrested in Tokyo in November after the allegations first surfaced.

His detention could have been extended on separate charges until 30 December.

However, in a shock decision the Tokyo District Court said on Thursday it had heard the prosecutors' request to keep Mr Ghosn in detention, and had rejected it. The move means he may be released as early as Friday.

The court also rejected an extension to the detention of Greg Kelly, an aide to Mr Ghosn.

Mr Ghosn, a towering figure in the auto industry, has previously denied the accusations made against him.

His defence team has said they are invalid because they do not relate to his salary, but to future payments that he was expected to receive after retirement.

Japanese prosecutors have also charged Nissan in relation to the case, which has continued to send shockwaves through the global car industry.

If Mr Ghosn is convicted, the charges could mean up to 10 years in prison. The charges also carry a fine of up to 700m Japanese yen ($6.2m; £4.9m), according to the Japanese regulator, the Securities and Exchange Surveillance Commission.

Mr Ghosn's detention has also put into doubt the future of the Alliance - a global carmaking group that includes Renault, Nissan and Mitsubishi.

Nissan and Mitsubishi both sacked Mr Ghosn as chairman after his arrest last month.

But Renault has held off doing so, choosing instead to appoint a temporary deputy chief executive to take over the running of the firm.

Who is Carlos Ghosn?

His hero status was so big that his life was serialised in one of Japan's famous cartoon comic books

The Brazilian-born boss of Lebanese descent and a French citizen says his background left him with a feeling of being different, which helped him adapt to new cultures

In France he was known as Le Cost Killer, a comment on the deep cuts he made to revive Renault

He was once tipped as a potential president of Lebanon, a move he eventually dismissed because he already had "too many jobs"

In a 2011 poll of people the Japanese would like to run their country Mr Ghosn came seventh, in front of Barack Obama (ninth)