Roman Polanski cannot return to the States without fear of being put in prison.

Los Angeles County Superior Court Judge Scott Gordon ruled Monday against the fugitive director's petition to be able to finally return to the US with time served for having sex with a minor, according to TMZ.

His lawyer, Harland Braun, had asked a judge to unseal a secret transcript that he said proved that L.A. County Superior Court Judge Laurence Rittenband in 1978 had accepted a plea deal, with Polanski set to serve a 48-day sentence.

Fearful that the judge was going to reneg and sentence him to 50 years, Polanski fled for France, where he's lived ever since.

A judge said Monday that fugitive Polish-French director Roman Polanski, seen in 2016 in France, cannot return to the US without fear of being jailed for having sex with a minor

Polanski appeared at the Santa Monica courthouse in 1977 on charges he had raped a minor; he pleaded down to statutory rape

Braun wanted the new judge to sentence the director to time served, as he spent an initial 42 days in prison before getting out on bail and an additional 10 months in prison and under house arrest in Switzerland.

The judge ruled that since he was in contempt of court for fleeing, he is a fugitive and therefore can't make deals with the court, echoing similar court decisions in the past, according to the Los Angeles Times.

The Oscar-winning director of 'The Pianist' and 'Chinatown' was accused of drugging the 13-year-old before raping her at film star Jack Nicholson's house in Los Angeles in 1977.

He admitted statutory rape after a number of more serious charges were dropped, and spent an initial 42 days in prison before getting out on bail.

Victim Samantha Geimer was 13 (left) when she met the then-42 year old Polanski; today (right) she says that he should be allowed to return to the US

He was also arrested in Switzerland in 2009 on a US extradition request and spent 10 months under house arrest before the request was rejected.

His attorney Harland Braun told Los Angeles Superior Court the 83-year-old filmmaker, who lives in Paris, had 'already done his time' and wanted to resolve the case with a finding that he has completed his sentence.

He asked Judge Scott Gordon to order prosecutors to give some indication of how much time - if any - they want Polanski to serve if he returns.

Polanski, above in 1977, served 42 days in jail and said he thought he was getting a plea deal to have served 48 days, however, he came to believe the judge was about to reneg and sentence him to 50 years

But the district attorney's office is objecting to what they say amounts to an 'advance preview' of Polanski's potential sentence.

'The people simply do not believe that it is in the best interests of justice to give a wealthy celebrity different treatment from any other fugitive from justice,' Deputy District Attorney Michele Hanisee said.

Hanisee wrote in a filing to the court that Polanski 'wants answers - but will only show up if he likes the answers.'

Polanski lives in Paris with his wife, actress Emmanuelle Seigner, with whom he is currently filming a movie

'He forfeited his right to make requests of the court when he fled,' she added.

Polanski has been engaged in a decades-long cat-and-mouse game with US officials seeking his extradition for trial, before a global audience split between continuing outrage and forgiveness for his acts.

The United States then asked Poland to extradite Polanski in January 2015, but the country's Supreme Court ruled in December that he had served his time under the plea deal.

The victim, Samantha Geimer, now 54, has long said that Polanski has suffered enough and should be allowed to return to the States.

In 2013, she wrote a book about her experience, called The Girl, and revealed she had exchanged friendly emails with Polanski and said she 'wishes him nothing but a nice life.'

Asked about her apparent change of heart about Polanski, Steve Cooley, the LA District Attorney once said 'You may want to ask her the details of the settlement she reached with Polanski,’ he said, referring to a 1993 out-of-court, six-figure settlement after she sued him in civil court.'

Polanski has fascinated the public for decades with his movies, and his personal life, which included second wife actress Sharon Tate being murdered in 1969 by the Manson family.

He is currently filming a movie with his third wife, Emmanuelle Seigner.