Polanski was arrested as he arrived in Zurich to receive a film festival award
Director Roman Polanski has lost an appeal to be released on bail from a Swiss jail ahead of his possible extradition to the US.
Switzerland's highest criminal court backed an earlier government ruling that there was a high risk of Polanski fleeing the country if he was released.
He is being held in Switzerland over his 1977 US conviction for unlawful sex with a 13-year-old girl.
He fled the US in 1978 before he could be sentenced.
"According to Swiss law, detention is the rule during the entire extradition proceedings," the Federal Criminal Court of Switzerland said in a statement.
"The court considered the risk that Roman Polanski might flee if released from custody as high."
Polanski's lawyer, Herve Temime, said that a further appeal would now be made to the Federal Supreme Court of Switzerland - the country's highest tribunal.
"We will seek to demonstrate that there is no risk in ordering Roman Polanski's release," Mr Temime said.
He added that Polanski's legal team would "provide even stronger and more suitable guarantees" against him leaving the country.
Polanski was arrested on 26 September as he travelled from France to collect a lifetime achievement award at the Zurich Film Festival.
The director, who was originally charged with six offences including rape and sodomy, pleaded guilty to unlawful sex with an under-age girl following a plea bargain in 1977.
He has not set foot in the US since taking flight, and has settled in France.
Speaking after Polanski's detention, US prosecutors disputed claims that his arrest came out of the blue, saying he had been on an Interpol "wanted list" for years.
"The idea that we have known where he is and we could have gotten him anytime, that just isn't the case," US Marshals Service chief inspector Thomas Hession said.