Image copyright EPA Image caption Panahi was unable to be in Berlin but his niece - and a star of the film - accepted the award on his behalf.

A film by dissident Iranian director Jafar Panahi has won the Golden Bear, the Berlin Film Festival's top prize.

Taxi is Panahi's third film since he was banned from making films by the Iranian authorities and forbidden from travelling in 2010.

It was filmed covertly as the director drove a taxi around Tehran.

British stars Sir Tom Courtenay and Charlotte Rampling won best actor and actress for their roles as a married couple in Andrew Haigh's 45 Years.

Taxi sees Panahi share his thoughts on contemporary Iran with passengers in the back of his cab, using a mounted dashboard camera to evade the scrutiny of the Iranian authorities.

It was one of 19 films vying for the prestigious Golden Bear award, including more high-profile fare from directors such as Wim Wenders, Terence Malick and Peter Greenaway.

'Love letter'

"Instead of allowing his spirit to be crushed and giving up, instead of allowing himself to be filled with anger and frustration, Jafar Panahi created a love letter to cinema," said Black Swan director Darren Aronofsky, who headed this year's jury.

"His film is filled with love for his art, his community, his country and his audience."

Owing to his travel ban, Panahi was unable to be in Berlin for the award ceremony, but his niece, Hana Saeidi, was on hand for a tearful acceptance of the statuette.

"I'm not able to say anything, I'm too moved," said Ms Saeidi, who appears in the film.

In 2011, the Iranian film-maker was made a jury member, but was once again unable to attend because of travel restrictions. An empty chair was left onstage as a reminder of his absence.

In an earlier statement, Panahi told festival organisers: "I'm a filmmaker. I can't do anything else but make films. Cinema is my expression and the meaning of my life. Nothing can prevent me from making films."

Speaking to Iran's Ilna news agency after his win, Panahi said: "I'm really happy for me and for Iranian cinema", but added "no prize is worth as much as my compatriots being able to see my films".

Image copyright AP Image caption The British stars play a couple contemplating their marriage in the run-up to their 45th wedding anniversary.

In 45 Years, Rampling and Courtenay play a long-married couple, whose relationship collapses after an unexpected revelation.

The film - from British director and writer Andrew Haigh - was widely praised by critics at the festival.

Sir Tom, 77, said he had waited for 30 years to receive the award, following "my friend Albert Finney who won in 1985".

He added that he was happy both leads had won: "I would have been really fed up if it had just been Charlotte - but not as fed up as she would have been if it had just been me," he said.

Other films in contention for the Golden Bear included Werner Herzog's Queen of the Desert, starring Nicole Kidman as Gertrude Bell and Robert Pattinson as TE Lawrence, and Bill Condon's Mr Holmes, starring Sir Ian McKellen as a retired Sherlock Holmes.

The 65th annual festival also saw the premiere of the film adaptation of Fifty Shades of Grey and the debut of Kenneth Branagh's live-action re-take of Cinderella.