Italy has rejected Tunisia's extradition request for a suspect in the March terrorist attack on the Bardo Museum in Tunis that killed 21 people.
A court in Milan ruled that there is no guarantee Abdel Majid Touil would not face the death penalty if sent back to Tunisia.
Tunisian authorities accuse him of providing support to the terrorists before arriving in Italy as an illegal migrant in February, about a month before the killings.
Touil, a Moroccan, was arrested in May and has denied involvement in the Tunis attack. He still could be prosecuted in Italy for alleged involvement in international terrorism, or deported to Morocco.
The Islamic State group claimed responsibility for the Bardo Museum attack and the June terrorist strike on a Tunisian beach resort that killed 38 foreign tourists.