Published: 2019-02-10 11:01:14 BdST
Other defendants received jail sentences ranging from 16 years to six months, state news agency TAP quoted court spokesman Soufiane Sliti as saying. In all, 51 suspects stood trial, of whom 27 were acquitted, in hearings that lasted 18 months.
The assault on the Bardo National Museum left 21 people dead, while 38 were killed in the beach resort of Sousse, some 150 kilometers (90 miles) south of the capital. Islamic State claimed both attacks.
The twin massacres, which took place within three months of each other, devastated Tunisia's economy - tourism is a major earner of foreign currency that accounts for about 8 percent of gross domestic product - as major European tour operators took flight.
The attacks also acted as a brake on political reforms hailed as a model of democratic transition following its 2011 'Arab Spring' uprising.
Tunisia remains one of the most secular countries in the Arab world, but authorities estimate about 3,000 of its citizens have joined Islamic State and other jihadist groups in Iraq, Syria and Libya.
Tourists have gradually returned as security has been stepped up, and Tunisia attracted a record 8.3 million visitors in 2018 as hotels were filled with holidaymakers from Algeria, Russia and other parts of Europe.
Photo name: Tunisia
Caption: A woman looks at the mosaic portraits of the victims of a militant attack on the Bardo national museum in Mar 2015 that killed 21 people, at the museum in Tunis, Tunisia Mar 19, 2016. REUTERS