A Tunisian court has handed 31 people death sentences over a 2014 attack on the home of then interior minister Lotfi Ben Jeddou, a judiciary spokesman said on Monday.

The 31, who included Algerians as well as Tunisians, were sentenced in absentia and some are reported to be already dead.

Al-Qaeda in the Islamic Maghreb (AQIM) claimed the attack on the minister's family home in the western border region of Kasserine, which left four police officers dead.

Ben Jeddou was not in the house at the time.

Those convicted were found guilty of "wilful homicide and membership of a terrorist group" and were also sentenced to 36 years in prison.

A total of 46 people were prosecuted over the attack, said the spokesman for Tunis district court, Sofiene Sliti.

Among the 15 remaining defendants, eight were sentenced to between three and 10 years in jail for "membership of a terrorist group" and "involvement in terrorism-related matters".

The court, which issued the rulings on Friday, dismissed cases against the remaining seven, Sliti told AFP.

Among the 31 sentenced to death were Seifallah Ben Hassine, an associate of late Al-Qaeda leader Osama bin Laden and founder of the jihadist group Ansar al-Sharia.

The New York Times has reported that Ben Hassine, also known by the nom de guerre Abou Iyadh, was killed in an air strike in Libya in mid-June last year.

The list also included Lokmane Abu Sakhr, an Algerian jihadist killed by Tunisian security forces at the end of March last year, also in Kasserine.

Since its independence from France in 1956, Tunisia has carried out 135 executions, but has observed a moratorium on the practice since 1991.

A new anti-terror law adopted in July upheld the death penalty, despite condemnation by local and international rights groups.

Since Tunisia's 2011 revolution, jihadist attacks have cost dozens of lives among security forces as well as civilians.

Attacks claimed by the Islamic State group on the National Bardo Museum in Tunis and a beach resort also killed 59 foreign tourists in 2015.

AFP