In 1977, Los Angeles director Roman Polanski was convicted of raping a 13-year old girl at a Hollywood party and has been on the run ever since but may soon return to the U.S. for the first time in four decades.

Polanski's attorney Harland Braun has reached a plea deal with the Los Angeles County Superior Court and judge Scott Gordon, Braun confirmed with Agence France Presse.

This plea deal would ensure Polanski can safely return to the United States and more importantly Los Angeles and avoid any further prosecution or prison time for his unlawful sex crime nearly 40 years prior.

Polanski plead guilty to drugging and raping the then 13-year-old Samantha Geimer in which he served a 42 days prison sentence before fleeing the U.S., when he thought a judge would sentence him to do hard time. Polanski, who has dual-residency in France and Poland has avoided further prosecution due to extradition laws, except for a 2009 10-month house arrest in Switzerland. Polanski primarily resides in France, where it is the only country where he won't be detained.

Being on the run has plagued Polanski for so long and has been made his life extremely difficult. He has been barred from returning to many places and often has to turn down offers such as that when he had to reside presidency for The Académie des Arts et Techniques, the French equivalent of the Oscars this month, due to protest from a French woman's group. Polanski also avoided returning to the U.S. to accept the Oscar for his film The Pianist.

Braun claims a secret plea deal was made in the U.S. in 2010 under judge Roger Gunson, that Polanski had an agreement in which he only had to serve 48 days prison time and in addition to Poland's refusal to extradite Polanski in January 2015 because he already served time, "If the court accepts the principle of comity, Roman can come to Los Angeles and to court without fear of custody," said Braun.

Polanski hopes that when this case is finally settled he can safely return to Krakow, Poland, to visit his father's grave and the grave of his late-wife Sharon Tate, who was brutally murdered in 1969 by the Charles Manson family when she was eight and a half months pregnant with her Polanski's only child, in Los Angeles.