LONDON — A bid by the U.S. to extradite Roman Polanski has been rejected by Poland’s Supreme Court.

The decision brings to an end efforts by the U.S. government to force Polanski to face justice for having had sex with a 13-year-old girl at a photo shoot in Los Angeles in the late 1970s. Polanski, who holds both Polish and French citizenship, is now free to live and work in Poland.

In May, Poland’s Justice Minister, Zbigniew Ziobro, had appealed to Poland’s Supreme Court to overturn a lower-court ruling that the director should not be sent to the U.S.

“We are very happy that the case is finally over,” one of Polanski’s lawyers, Jan Olszewski, told Reuters. “We hope that this ruling becomes a stimulus for the American side to perhaps use existing legal opportunities to issue a ruling in absentia and consider the penalty served.”

Polanski had intended to shoot a film about the Dreyfus Affair in Poland, based on Robert Harris’ novel “An Officer and a Spy.” The project’s French producer Robert Benmussa subsequently decided to shoot the film in France instead. Polanski is shooting the film there at present.

Olszewski said he had spoken with Polanski on the phone. “He is beyond happy that this is finally over. At least in Poland,” Olszewski said.