Three men have been found guilty of charges relating to the Garissa University attack in Kenya in 2015.
Rashid Charles Mberesero, Mohamed Ali Abikar and Hassan Edin Hassan were found guilty of conspiracy to commit the attack in which four gunmen killed 148 people, mainly students.
They were also found guilty of belonging to Somalia’s al-Shabab Islamist militant group.
A fourth man, Sahal Diriye Hussein, was acquitted of the charges.
All four men are Kenyan nationals except Rashid Charles Mberesero, who is Tanzanian.
Judge Francis Andayi said the three men found guilty “were members of the al-Shabaab terrorist group whose members carried out the attack”, AFP reported.
Mr Andayi said prosecutors had proven “beyond reasonable doubt” that the three men “knew the plot” but did not provide further details of the alleged conspiracy.
The attack was carried out by al-Shabab, a group affiliated to al-Qaeda, at the north-east Kenyan university in April 2015.
It was the second deadliest attack in Kenya’s history, following the al-Qaeda bombing of the US embassy in 1998 which killed more than 200 people.
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.
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.
Kenyan authorities were criticised for not investigating intelligence in the lead-up to the attack, as well as responding poorly when it occurred.
A long wait for justice
Emmanuel Ingoza, BBC Africa, Nairobi
Victims of the attack like Anastasia Mikwa still bear visible and hidden scars. The 23-year-old former Garissa University student was shot multiple times in the attack. Despite undergoing surgery 32 times, she still relies on care and support from her parents.
The judgement will offer little, if any, reprieve to victims like her and their families.
There will, however, be a sense of closure at the end of a case that has dragged on for nearly four years.
The trial had been beset by changes of magistrates and witnesses not showing up in court, a situation typical of the Kenyan justice system.
The ruling today is hugely significant. This was after all the deadliest attack on Kenyan soil since the 1998 US embassy bombings.
The conviction is also in some ways a victory for the Kenyan police and prosecutors, who have constantly faced accusations of botching high-profile cases like this one.
What happened during the attack?
In the early hours of 2 April 2015, heavily armed attackers stormed Garissa University 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 is a jihadist group in east Africa which is strongly affiliated to al-Jazeera.
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, who say 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.
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.”
Garissa University attack: Three convicted over Kenya massacre