CANNES, France - American director Terrence Malick's expansive drama The Tree of Life won the top honor at the Cannes Film Festival on Sunday, and Kirsten Dunst took the prize for best actress for Melancholia, an apocalyptic saga.

The Palme d'Or was accepted by two Tree of Life producers, Dede Gardner and Bill Pohlad, for the notoriously press-shy Malick, who has skipped all public events at the festival.

"I know he would be thrilled with this," Pohlad said later. "Why isn't he here? I'm not saying it's an easy question to answer, but he personally is a very humble guy and a very shy guy. He just very sincerely wants the work to speak for itself."

Gardner said that when it came to the prospect of Cannes prizes, Malick had been "very sweet. He said, 'If we were that lucky, I'd like to thank my wife, Becky, and my parents.' "

The Tree of Life, which opens Friday in the United States, stars Brad Pitt, Sean Penn, and Jessica Chastain in a wide-ranging story of family life that plays out against a cosmic backdrop, including glorious visuals of the creation of the universe and the era of dinosaurs.

Dunst won for her role in the end-of-the-world tale Melancholia, whose director, Denmark's Lars von Trier, was banned from the festival after making remarks sympathetic to Adolf Hitler at a movie news conference as Dunst rolled her eyes.

"Wow, what a week it's been," said the actress, who plays a deeply depressed woman coping with her family's foibles as a rogue planet bears down on Earth.

"It's an honor that is a once-in-a-lifetime thing for an actress," she said, thanking festival organizers for allowing Melancholia to remain in competition after von Trier's remarks. Of the director, she said, "I want to thank Lars for giving me the opportunity to be so brave."

Jean Dujardin claimed the best-actor prize for the silent film The Artist, in which he plays a 1920s Hollywood star whose career crumbles during the advent of talkies. In keeping with his singing, hoofing character, Dujardin did a little tap dance as he took to the Cannes stage.

Dujardin said he wanted to share his prize with co-star Berenice Bejo, who stood and blew kisses at him on stage. The film was directed by her husband, French filmmaker Michel Hazanavicius, who also directed Dujardin in the OSS 117 spy spoofs.

"I hope to make other silent films with you," Dujardin told Hazanavicius.

Several well-received films, among them Spanish director Pedro Almodovar's horror thriller The Skin I Live In and British filmmaker Lynne Ramsay's We Need to Talk About Kevin left empty-handed.

Malick, who has made only five films in a nearly 40-year career, previously won the directing prize in 1979 for Days of Heaven on his last trip to Cannes. The Tree of Life was shot three years ago, and festival organizers had hoped to premiere it last year, but it was not ready in time.

Prizes were awarded by a nine-member jury headed by Robert De Niro that included actors Uma Thurman and Jude Law. The Tree of Life was the first American film to win top honors at Cannes since back-to-back recipients in 2003 (Gus Van Sant's Elephant) and 2004 (Michael Moore's Fahrenheit 9/11).

De Niro told reporters that, of the 20 competing titles, The Tree of Life "had the size, the importance, the intention, whatever you want to call it, that seemed to fit the prize."

The second-place grand prize was shared by Belgian brothers Jean-Pierre and Luc Dardenne, two-time winners of the Palme d'Or, for their troubled-youth drama The Kid With a Bike, and Turkish director Nuri Bilge Ceylan for his meditative saga Once Upon a Time in Anatolia.

The third-place jury prize went to French actress/director Maiwenn's child-protection drama Polisse.

Von Trier's Melancholia found favor with jurors despite a so-so reception from critics and the furor he provoked at the film's news conference Wednesday when he delivered rambling remarks about his German heritage in which he said he understood and sympathized with Hitler.

He also made remarks about Jews that brought condemnation from Jewish and Holocaust groups and prompted Cannes organizers to boot him out, an unprecedented punishment for a filmmaker who won the Palme d'Or in 2000 with Dancer in the Dark.

(In a weekend interview with the Chicago Tribune, von Trier said festival no-show Malick had "a perfect strategy.")

Another Danish filmmaker, Nicolas Winding Refn, won the directing award for Drive, his hugely popular action thriller starring Ryan Gosling as a Hollywood stunt driver caught up in a heist gone wrong. Refn gushed thanks for Gosling, who was allowed to choose a director.

The screenplay award went to Israeli filmmaker Joseph Cedar for Footnote, his comic tale of rival father and son Talmudic scholars.