Lawyers for Roman Polanski battled prosecutors in a California court on Thursday, arguing again for dismissal of the film director's 1977 guilty plea for having sex with an underage girl, citing judicial misconduct.

But prosecutors told the appeals court the Oscar-winning filmmaker, who fled the United States in 1978 and is now under house arrest in Switzerland, should first return to Los Angeles to face sentencing, as one judge previously ruled.

At stake for the maker of films such as Rosemary's Baby, Chinatown and The Pianist, which earned the French-born Polanski an Academy Award for best director, is perhaps two years in a California prison for the crime.

The three-judge appeals panel is expected to rule within 90 days. Among its options are asking a lower court to reconsider dismissing the case, or doing nothing at all.

I think the odds of him being able to get the case dismissed at this point in time are not good, said Steve Cron, a defense attorney and adjunct professor at Pepperdine Law School, who is not part of the case.

Short of dismissing the case, Polanski attorney Chad Hummel asked the appeals court to order a new hearing into allegations that a Los Angeles judge engaged in backroom manipulations while handling the case in 1977.

Polanski pleaded guilty to a charge of having unlawful sex with a 13-year-old girl. At the time, Los Angeles Superior Court Judge Laurence Rittenband, who has since died, sent Polanski to prison for mental evaluation, and he served 42 days there.

The director expected a final sentencing of time served, which was in line with his plea deal, but he came to believe Rittenband might send him back to jail. Polanski fled to France and has remained outside the United States since. He was arrested in Switzerland in September on a U.S. warrant.

At Thursday's hearing, Los Angeles prosecutor Phyllis Asayama argued Polanski must return to the United States and should not be allowed to mail in his defense.

When Asayama was asked if Los Angeles prosecutors planned to look into allegations of misconduct, she said questions about wrongdoing could be addressed only after he comes back.

Asayama said if wrongdoing did take place, Polanski might face a lighter sentence, but for now the case must stay as is.

(Polanski) stands in the same position today that he did 30 years ago, Asayama said.

Prosecutors have said Polanski faces a maximum sentence of two years in California prison if returned.

Earlier this year, Polanski's attorneys made similar arguments for dismissal in a Los Angeles court, and Judge Peter Espinoza said substantial misconduct did occur.

But in May, Espinoza refused to dismiss the case, saying Polanski must first appear in his courtroom.