Austrian director Michael Haneke's drama The White Ribbon has nabbed the top prize at the Cannes Film Festival.

haneke-cannes-cp-250-676007

Austrian director Michael Haneke receives the Palme d'Or award for the film The White Ribbon at the 62nd Cannes International Film Festival on Sunday. ((Lionel Corinneau/Associated Press))

The black-and-white film captured the Palme d'Or.  Haneke's exquisitely shot movie delves into themes of guilt, punishment and trust among the denizens of a small German town just before the First World War starts.

Haneke referred to his wife as he accepted his award on Sunday at a ceremony in the southern French town, noting that "happiness is very rare."

"This is one moment in my life in which I'm very happy, and so are you, I believe," he said

Haneke beat out four previous Palme d'Or winners — Lars von Trier (Antichrist), Ken Loach (Looking for Eric), Quentin Tarantino (Inglourious Basterds)  and Jane Campion (Bright Star).  Twenty films in all were in the running for the big trophy.

The White Ribbon also picked up the French Education Ministry prize, meaning it will be promoted to teachers as a work worth studying in the classroom.

The second-place grand prize went to French director Jacques Audiard's prison drama A Prophet.  The film — about an illiterate French-Arab youth's coming of age inside a brutal prison system — was the heavy favourite as it got a lot of critical acclaim.

Christoph Waltz captured the male acting honour for his role in Inglourious Basterds — about a group of Jewish soldiers who assassinate Nazis.

Von Trier's outrageous Antichrist scores one honour

Charlotte Gainsbourg was handed the female acting prize for playing a psychotic woman who tortures her husband (Willem Dafoe) and mutilates herself as an act of healing in Antichrist.

gainsbourg-cp-250-6759724

French actress Charlotte Gainsbourg poses with the Best Actress award she received for the film Antichrist, which caused a scandal at the festival for its brutal portrayal of torture and mutilation. ((Lionel Cirroneau/Asssociated Press))

Gainsbourg thanked Dafoe and von Trier, "who allowed me to live what I believe to be the strongest, most painful and most exciting experience of my whole life."

The movie became the talk of the festival, triggering a round of boos at its first screening, walkouts, jeers and condemnation for its explicit violence.

Von Trier — with a reputation already as a maverick for films such as Breaking the Waves and 2000 Palme d'Or winner Dancer in the Dark — had called it the most important work of his career.

The jury prize, or third place, was shared by British director Andrea Arnold for Fish Tank and Park Chan-wook's vampire romance Thirst.

Meanwhile, Canadian animator Cordell Barker, won the Petit Rail d'Or prize for best short film, for his nine-minute cartoon, Runaway.  Barker was handed the prize — given out by a group of railway workers who attend Cannes every year — on Saturday.

Barker's piece, produced by the NFB,  imagines the world as a driverless train careering over bumpy tracks and when the train breaks down, a class struggle ensues.

The Winnipeg-born  animator also created The Cat Came Back (1988) and Strange Invaders (2002), both of which got Academy Award nominations.

As for the main prizes, the directing award went to Brillante Mendoza of the Philippines for Kinatay, a story of the retribution inflicted on a prostitute by police.

Writer Feng Mei won the screenplay award for Chinese director Lou Ye's Spring Fever, a tale of forbidden homosexual relationships.

The Camera d'Or award for best debut film went to Australian director Warwick Thornton for Samson and Delilah.

With files from The Associated Press