Another chapter in the twisting legal saga of director Roman Polanski unfolded in a downtown Los Angeles courtroom Monday morning as a defense attorney argued that the director should be allowed to return to the U.S. and be sentenced to time served decades after pleading guilty to having sex with a minor in the spring of 1977.

Attorney Harland Braun said Monday that Polanski, who would have faced a maximum of 12 months in prison for the crime under the penal code as it was written in the 1970s, has effectively served that sentence already between his previous detention in Los Angeles and the nearly 10 months he served in a Swiss jail when he was detained there in 2009.

“He has actually done nearly eight times the sentence he was promised,” Braun said.

Superior Court Judge Scott M. Gordon did not enter a ruling Monday morning and has 90 days to deliver a written order in the case, according to Mary Hearn, a spokeswoman for Los Angeles Superior Court.

After the hearing, Braun told reporters that his client would return to the U.S. immediately as long as he knew he would be sentenced under the terms of his original plea deal.

The case dates back to 1977, when Polanski, then 43, picked up Samantha Gailey — a 13-year-old junior high student — and brought her to Jack Nicholson’s house for a photo shoot. He gave her champagne and part of a Quaalude pill and, according to testimony from Gailey, he forced her to have sex with him.

After reaching a deal with prosecutors, Polanski, who pleaded guilty to unlawful intercourse with a minor, was sent to a state prison for a 90-day diagnostic evaluation. Judge Laurence Rittenband, who presided over the case at the time, said the evaluation would help him reach a fair sentencing decision. The director was released after 42 days, and prison officials said they didn’t believe he needed additional prison time. Rittenband, facing fierce media pressure, went against the recommendation, saying he planned to send Polanski back to prison for an additional 48 days.

As the decades have worn on, two portraits of Polanski have emerged. While many still shun him as a criminal who fled from justice, some in Hollywood have argued he was treated unfairly by a judge who wanted to make an example of a powerful filmmaker.

Director Brett Ratner, a close friend of Polanski, was in the courthouse Monday and could be seen chatting with Braun in an adjacent hallway. He declined to comment and walked away when approached by reporters.

In court, Braun asked that prosecutors say what kind of sentence they would seek for Polanski if he returns to the U.S. He also asked the judge to sentence Polanski in absentia.

Braun dropped an argument he had made in court papers to unseal testimony delivered years ago by retired prosecutor Roger Gunson, who initially handled Polanski’s case in the 1970s. Gunson testified in 2010 and the transcripts were sealed by an L.A. judge.

The Los Angeles County district attorney’s office objected to Braun’s request, saying it fell into a pattern of Polanski asking for special treatment. Deputy Dist. Atty. Michele Hanisee scoffed at Braun’s arguments to vacate a warrant for Polanski’s arrest or allow him to be sentenced before he returned to the country.

”The people simply do not believe it is in the best interests of justice to give a wealthy celebrity different treatment than any other fugitive from justice,” she told the judge.

The district attorney’s office has previously said that the filmmaker faces up two years in state prison if he returns for sentencing.

In the late 1990s, Polanski nearly struck a deal with the D.A.’s office. According to prosecutors, Larry P. Fidler, the judge overseeing the case at that time, said that if Polanski returned to L.A. he wouldn’t have to serve more time.

But when Fidler made it clear that Polanski’s sentencing would be held in open court, prosecutors said Polanski became fearful of the media attention and backed out. Polanski’s attorney acknowledged that the decision not to return then may have been a mistake, but said that his client wanted to protect his young children.

Prosecutors derided Polanski’s recent request that the judge indicate a potential sentence should he return as “an advanced preview.”

“The defendant is, once again, trying to dictate the terms of his return without risk to himself,” prosecutors wrote. “Defendant wants answers — but will only show up if he likes the answers. He forfeited his right to make requests of the court when he fled.”

In an interview Friday, Braun rejected the district attorney’s claims, saying it’s common for judges to offer indicated sentences.

“It’s all politics, I’m afraid,” Braun said, adding that his client never would have fled in the first place if he hadn’t been misled by the L.A. County court system.