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.
- Is it safe to go on holiday in Tunisia?
- How attack changed Tunisia’s security
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.
How the attacks unfolded
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.
- Sousse beach attack: how it unfolded
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.
Thirty of the 38 who lost their lives in the beach attack were British.
Among the dead were a 24-year-old beauty blogger; a 49-year-old man, his father and his nephew; and several couples on holiday together.
Beauty blogger Carly Lovett had recently got engaged to Liam, her childhood sweetheart of 10 years.
Adrian Evans, 49, from Tipton in the West Midlands, died along with his father, 78-year-old Charles (known as Patrick) Evans, and nephew Joel Richards, 19, from Wednesbury.
A number of married couples lost their lives. William Graham, 51, and Lisa Graham, 50, were in Tunisia to celebrate Mrs Graham’s 50th birthday.
- Tunisia beach attack: The British victims
The victims of the Bardo museum attack came from around the world.
Three Japanese tourists died, alongside four Italians, three French, two Colombians, two Spaniards, and one national each from Russia and Britain. Two Tunisian citizens, including one police officer, died.
More than 50 people were wounded.