Moroccan director Mohammed Mouftakir's "L'Orchestre des Aveugles" (The Blind Orchestra) took the Tanit d'Or at the Carthage Film Festival, blighted earlier in the week by a suicide bombing in the Tunisian capital.
The Tanit d'Argent was awarded to "The Endless River", by South Africa's Oliver Hermanus, while the Tanit de Bronze went to "A Peine J'ouvre les Yeux" (As I Open My Eyes) by Tunisia's Leyla Bouzid.
Meanwhile, Nabil Ayouch's "Much Loved", banned at home in Morocco, won the Jury Prize.
The awards ceremony, hosted by satirical Egyptian TV personality Bassem Youssef at Tunis's municipal theatre, took place under heavy security.
On Tuesday, a suicide bomber blew himself up on a bus carrying presidential security guards in Tunis, killing 12 of them.
That was the latest in a string of terror attacks in the North African country, birthplace of the ill-fated Arab Spring.
Earlier this year, jihadist gunmen killed 59 foreign tourists in attacks on the national museum and on a popular seaside resort.
Tunisian filmmaker Salma Baccar said at the beginning of the ceremony that "we don't feel the same joy we usually feel in our hearts, but (the festival) is a challenge to those who have a culture of death."
Just after Tuesday's suicide bombing, festival director Ibrahim Letaief said there was no question of cancelling the competition, saying that is "the only way to respond to these barbaric acts".
The film festival, which has now completed its 26th edition, is a showcase for Arab and African artists.
The official competition included 17 feature-length films, 13 shorts and 16 documentaries.