Seven jihadists have been sentenced to life in prison in Tunisia over attacks at a museum and a beach resort in 2015.
Sixty people, mostly tourists, died in the two attacks and many were wounded.
Some of the many defendants received lesser sentences and 27 were acquitted. Prosecutors plan to appeal.
The first attack, at the Bardo Museum in Tunis in March 2015 killed 22. Three months later, 38 tourists, most of them British, were shot dead at Port El Kantaoui, near Sousse.
The so-called Islamic State group said it had carried out the attacks.
The man believed to have planned both, Chamseddine al-Sandi, remains at large. Unconfirmed reports suggested he may have died in a US air strike in February 2016 in Libya.
There were two separate trials. In the Sousse trial, four militants were given life sentences, while five others were sentenced to between six months and 16 years. In the Bardo trial, three defendants received life terms and a number of others were jailed for shorter periods. Ten were acquitted.
On 18 March, two gunmen in military uniforms stormed the National Bardo Museum, near the city's parliament buildings, where anti-terrorism legislation was under discussion.
Twenty-two people, including 17 foreign tourists, were killed – 21 at the scene and one more 10 days later. Among the dead were citizens from Japan, Italy, Colombia, Australia, France, Poland and Spain.
Two Tunisians, one a police officer, were also killed. More than 40 people were injured. The attackers, Tunisian citizens Yassine Labidi and Saber Khachnaoui, were killed by police.
Three months later, on 26 June, a Tunisian electronics student, Seifeddine Rezgui, opened fire on tourists staying in the popular resort of Port El Kantaoui, just north of Sousse.
Rezgui was dropped off down a side road, a short distance from the beach, and walked the rest of the way with a Kalashnikov rifle hidden in a parasol. When he arrived at the five-star Hotel Rui Imperial Marhaba, he opened fire indiscriminately at tourists on sun loungers on the beach.
As holidaymakers fled for their lives, the gunman continued his attack, entering the hotel complex via the pool area. He killed 38 people before fleeing into the streets, where he was shot by police.
A state of emergency has been in place in Tunisia since the attacks.
The nation's already faltering tourism industry was badly hit, but it has shown signs of recovery in the past year with travel bans lifted by several countries, including the UK.
There has been considerable progress in combating jihadists in Tunisia thanks to concerted international help, according to the BBC's Middle East analyst, Sebastian Usher, but the militants still pose a potent threat while the endemic problems of chronic unemployment and lack of economic opportunity persist.