A teenage university student who spent his entire student loan attempting to join Islamic State (IS, formerly ISIS/ISIL) in Syria has been sent to a young offender institution for three-and-a-half years.

Cubeyda Jama, 19, was arrested at London Stansted Airport in February on a plane bound for Bucharest, Romania – from where he intended to make his way to Syria.

The Finnish national of Somali descent spent his loan on equipment for the trip, including a map of Turkey, protective clothing, torches, a solar-powered charger and a laptop.

A search of his USB stick revealed instructions on how to travel to IS-held territory and 13 copies of the group’s Dabiq magazine.

ISIS recruiting British men for "lone wolf attacks" on landmarks like Big Ben https://t.co/XlUfbObYgcpic.twitter.com/Ypl8HPLMYR — RT UK (@RTUKnews) July 28, 2016

Detectives found Jama had “beheading videos” saved on his phone and that he had searched on Google for “how to reach the Syrian border” and “paths to ISIS.”

Police also discovered a pledge of allegiance, written in Arabic, to IS leader Abu Bakr Al-Baghdadi in his London home.

Jama has lived with his father in the UK since 2010 and was studying computer science at Middlesex University, the court heard.

At the Old Bailey, he admitted a charge of preparing acts of terrorism by making travel arrangements and gathering equipment to travel to Syria or Iraq.

Mum-of-three bound for ISIS has children taken away after High Court ruling https://t.co/AQmGC5kPmKpic.twitter.com/S4fJH9JVid — RT UK (@RTUKnews) May 5, 2016

An assessment by a psychologist found Jama to be “immature for his age and of low to average intelligence.”

His lawyer, Hossein Zahir, said Jama had been “subject to grooming” by extremists on internet forums.

Zahir added that Jama was poorly prepared to make the trip to Syria from Romania because he had little money and no local contacts.

The Metropolitan Police said Jama’s USB stick contained a “step by step” terrorist guide, a document titled ‘39 ways to participate in jihad’ and a file titled ‘self-sacrifice,’ which set out arguments in favor of suicide bombings.

‘ISIS has terror cells in England’ – US intelligence chief https://t.co/T4FddNyeMupic.twitter.com/1qrbLk1xTS — RT UK (@RTUKnews) April 27, 2016

During sentencing, Judge Gerald Gordon said: “You are described by the psychologist as naive, and I think that is right.”

He added: “It is clear from what you have yourself subsequently said, that you realized fully that once you had, or if you did, achieve your aim of joining Daesh [Arabic pejorative term for IS], you would have had no option but to do whatever was required of you.

“It is clear to me that you were dangerous at the time. There are some indications that you may be learning the error of your ways, but it is too early to say that you are at present no longer dangerous.”