In a stunning Oscar upset, Roman Polanski - who cannot set foot in the United States without going to jail - won the Academy Award for best director on Sunday night for his searing Holocaust drama "The Pianist."

Polanski, who fled the United States for France in 1978 as he was about to be sentenced to prison for having sex with a 13-year-old girl, won the Oscar in his third nomination as best director.

Polanski's award was accepted for him in his absence.

Polanski previously was nominated for directing the 1974 film "Chinatown" and the 1979 drama "Tess." He also received a screenwriting nomination for "Rosemary's Baby."

Many in the audience at the Kodak Theatre rose to their feet in a standing ovation, while others remained seated, including his "Chinatown" star, Jack Nicholson.

It was at Nicholson's home that Polanski later admitted to having sex with the underage girl after plying her with champagne and pills. A stone-faced Anjelica Huston, who was in another area of the house at the time, applauded.

Return to the limelight

The controversial director, whose mother perished in a concentration camp and whose pregnant wife Sharon Tate was murdered in 1969 by the followers of cult leader Charles Manson, has had a spotty career for the last two decades, but his win for "The Pianist" has him poised to return to the limelight despite his legal troubles.

British playwright, Ronald Harwood, who won the best adapted screenplay Oscar for turning an obscure book by Polish Jewish pianist Wladyslaw Szpilman into the film, saluted Polanski in his own acceptance speech.

"Roman Polanski deserves this," Harwood said. "He's a great director and a wonderful colleague."

Drew heavily on his own childhood

Polanski, in a recent satellite-feed interview with members of the Directors Guild of America, said he drew heavily on his own childhood Holocaust experiences to make the film.

"This was my youth," he said, adding that the task of developing the screenplay with Harwood was so harrowing that he resorted to gallows humor to get through the day.

"I would ask, 'How many Jews did we kill today?'" he recounted of the bad-taste jokes he made to get through the ordeal of making the picture.

"The Pianist" is based on Szpilman's 1946 memoir about how he became only one of about 20 Jews to survive the Nazi's wholesale murder of Warsaw's once-thriving Jewish community in Warsaw.

Despite positive reviews for his film, Polanski was widely considered an underdog in this year's Oscar race due to lingering controversy stemming from his 25-year-old statutory rape conviction.

His nomination ignited a spirited debate in Hollywood about whether Polanski's criminal past should weigh on the judgment of his work or whether the film should be considered strictly on its own merits

The victim at the center of the quarter-century case against Polanski, now a married mother of three living in Hawaii, has said she forgives the director and believes his exile has been punishment enough.

The film, which won the Palme d'Or at this year's Cannes Film Festival, also earned its star Adrien Brody an Oscar for best actor.