Director Licinio Azevedo (C), flanked by actors Matamba Joaquim (L) and Thiago Justino, poses after receiving the Tanit d'Or award for his film "The Train of Salt and Sugar" at the Carthage Film Festival on November 11, 2017

The story of an epic train journey across war-torn Mozambique by a Brazilian director has been awarded the top prize at Tunisia's Carthage Film Festival.

"The Train of Salt and Sugar" by Licinio Azevedo, a Brazilian who lives in the African country, received the Tanit d'Or as the festival wrapped up on Saturday.

Like a Western, the film follows the perilous journey of a train that sets off across rebel-held areas to exchange salt for sugar in 1989 during Mozambique's civil war.

The Tanit d'Argent went to South Africa's John Trengove for his first feature "The Wound", which has sparked controversy at home over its portrayal of homosexual love and an ancestral initiation rite.

Veteran Moroccan director Faouzi Bensaidi received the Tanit de Bronze for "Volubilis", a social critique of extreme liberalism.

Among the documentaries, the jury awarded Palestinian director Raed Andoni's "Ghost Hunting", which recreates a notorious Israeli interrogation centre and has former prisoners re-enact experiences in a bid to free them of their demons.

Third place went to Nada Mezni Hafaiedh's "Upon the shadow", a frank documentary about the lives of gay Tunisians in a country where homosexuality is a crime.

Hafeidh said she was "surprised there were so few complaints" after her documentary's screening in its home country on Friday.

She said she was astonished her film had been selected for the festival at all, enabling Tunisians to see it, "because I know that sadly in Tunisia being gay is an abomination".