A medical student cleared of terrorism charges will graduate three years after taking his exams.

Yousif Badri was arrested the day after completing his studies at Aberdeen University in June 2013.

He was accused of behaving "with the intention of committing acts of terrorism" after downloading extremist magazines and videos.

The 30-year-old was found not guilty in October and will finally graduate in absentia on Friday.

Many of the foundations of the prosecution's case against Mr Badri were thrown out over the course of his High Court hearing.

It emerged during the trial the 30-year-old had only sought out extremist material in an attempt to understand terrorists.

Mr Badri told STV News: "To build bridges you have to understand the issues extremists use.

"You have to know what their narrative is and counter that narrative. You have to actually read what they argue. If you can get to the essence of their arguments you can unpick them."

It was suggested that because Mr Badri had a tub of nails and no hammer, the nails could have been used to make a bomb.

The nails had been brought to the flat by Mr Badri's father while he was carrying out DIY work, however, and the hammer had been borrowed by a friend.

Photographs the prosecution claimed showed Mr Badri posing with an AK47 actually showed him holding a plastic toy.

The prosecution claimed he was drinking protein shakes and exercising to get his body ready to commit terrorism - but the jury heard that Mr Badri had a pacemaker and had to keep fit.

Mr Badri, who now plans to become a doctor in Aberdeen, told STV News earlier this month: "I'll carry the stigma for the rest of my life [but] I don't think I feel like I should run away - there's no need to hide."