A Polish court has rejected attempts by the United States to extradite director Roman Polanski his 1977 conviction for unlawful sexual intercourse with a minor, citing misconduct by the part of the US court system.

Judge Dariusz Mazur said on Friday that Mr. Polanski's extradition could not be allowed under Polish law. Polanski’s right to a fair trial and defense were “grossly and repeatedly violated,” Judge Mazur said, according to Reuters.

Mazur's decision is the latest in a case that has spanned four decades. Polanski pleaded guilty in 1977 to sex with a minor but fled to Europe before his sentencing. He holds French and Polish citizenship, and France’s limited extradition policies have protected him for years.

In 2009, Polanski was arrested during a visit to his vacation home in Switzerland. The Swiss police were acting on a request from the US government, and Polanski was held in house arrest until 2010 when the Swiss government ultimately decided not to extradite him.

Polanski served 42 days in jail after accepting a plea deal in 1977. He fled after learning that the court judge overseeing the trial had decided to change his sentencing.

Mazur said it was clear Polanksi was guilty but argued that various restrictions placed on the director’s freedoms equated to a year-long jail term, more than his original plea deal agreed to.

Judge Mazur also cited concerns over comments made by US judges in response to the trial. He referred to statements made last year by a Los Angeles judge, who said Polanski should “cool his heels in jail,” if the filmmaker returned to the US under a proposed deal that would have pronounced his time served.

“If I were to behave like them, I’d lose the respect of all my subordinates here,” Mazur said, according to The New York Times.

The case has prompted a range of opinions over the years. Some demand harsh sentencing and others urging the case be dropped.

Samantha Geimer, the victim in the case, is urging for the charges to be dropped.

"The message is they will use a teenage rape victim until their dying breath to get some PR, and justice is NOT something they seek for victims …” she wrote on her Facebook page.