A Kuwaiti court has sentenced a citizen to five years in prison on charges of joining the terrorist Daesh (Isis) group and planning attacks in Saudi Arabia.

The man was put on trial after investigations showed he had joined Daesh and planned terrorist acts against Shiites in Saudi Arabia, Kuwaiti newspaper Al Anba reported. He had also encouraged relatives to join the militant organisation.

Last month, Kuwait said it has arrested citizens over joining a banned organisation seeking to “undermine the country’s constituent systems”.

The Interior Ministry said the detainees had spread the group’s ideology on social media, planned to leave the country and join other members of the unspecified organisation.

In May, Kuwaiti prosecutors ordered the remand of a citizen charged with joining an outlawed group and planning terror attacks in Saudi Arabia. The man was also accused of promoting the banned group’s ideology on social media and pursuing activities harmful to the country’s national interests.

Also in May, a Kuwaiti juveniles court sentenced a teenager to five years in prison for joining Daesh and planning to blow up a Shiite mosque with an explosive-laden drone.

In 2015, some 27 people were killed in the bombing of a Shiite mosque in Kuwait. The bombing claimed by Daesh, was carried out by a suicide attacker during the congregation Friday prayers in Al Sadeq Mosque.

The terrorist attack was the first of its kind in Kuwait in more than two decades

Last year, an inmate convicted of involvement in the bombing attack was executed. He was charged with aiding the suicide bomber by driving the attacker to the mosque. Five other defendants were tried in absentia and sentenced to death. Eight others were sentenced to 15 years in prison each in the same case.