A court in Kenya has sentenced a militant Islamist to life in prison for his role in the 2015 Garissa University College attack, which left 148 people dead.
Two other militants were jailed for 41 years each.
The three had earlier been found guilty of conspiracy to commit a terrorist attack and of belonging to al-Shabab, which is linked to al-Qaeda.
It was the second-deadliest attack in Kenya.
The al-Qaeda bombing of the US embassy in 1998 killed more than 200 people.
Rashid Charles Mberesero, who was given a life sentence, is a Tanzanian, while the other two men, Mohamed Ali Abikar and Hassan Edin Hassan, are Kenyans.
Mberesero was given the longest term because he was arrested at the scene of the massacre and could not explain his presence, the court heard, the AFP news agency reports.
The attack was carried out by al-Shabab at the north-eastern Kenyan university in April 2015.
The four gunmen were killed at the scene and the man who plotted the attack, Mohamed Kuno, was killed in a raid in Somalia in 2016.
The trial has been beset by changes of magistrates and witnesses not showing up in court, a situation typical of the Kenyan justice system, reports the BBC’s Emmanuel Igunza from Kenya’s capital, Nairobi.
The three were eventually convicted last month.
What happened during the attack?
In the early hours of 2 April 2015, heavily armed attackers stormed Garissa University College and shot dead two security guards before aiming fire at students.
The gunmen raided the campus, attacking students in their classrooms while they were preparing for exams.
Witnesses said Christians were singled out by the militants and shot.
More than 500 students managed to escape, some through a fence. Some locked themselves in rooms and cupboards.
Seventy-nine were injured in the attack.
Wearing suicide vests, the four gunmen were eventually surrounded in a dormitory where the vests detonated and they died.
Who was behind the massacre?
Al-Shabab, a jihadist group in East Africa which is affiliated to al-Qaeda.
The group has repeatedly attacked Kenya, including a raid on Westgate shopping centre in Nairobi in September 2013, when 67 people died in a four-day siege.
Al-Shabab says it has been at war with Kenya ever since Kenyan forces entered Somalia in October 2011 in an effort to crush the militants, BBC Somalia specialist Mary Harper says.
The Kenyan government wanted to stop militants crossing the border between the two countries and kidnapping people, which was affecting tourism.
This provoked al-Shabab, which says Kenyan civilians are legitimate targets because they voted for the government that declared war on the group.
Who were the victims?
Out of the 148 people that were killed in the Garissa massacre, 142 were students.
By attacking young, future professionals, the massacre aimed to disrupt the country’s socio-economic growth and stability, as well as divide a multi-faith country, analysts say.
Officials say three members of the security forces were killed as well as three university guards.
Some of the victims called their families as the attacks were taking place and many relatives travelled to the Chiromo mortuary in Nairobi to identify their loved ones in the days that followed.
The hashtag #147notjustanumber – referring to the original death toll – started trending on Twitter in response to the killings.
Kenyan activist Ory Okolloh started an online campaign to make sure all the victims were remembered, tweeting to her followers: “#147notjustanumber. We will name them one by one.”