
Malaysian Mohamad Hidayat Azman, 20, had pleaded guilty on September 27.
The judge, Mohamad Shariff Abu Samah, ordered that the sentence run from Mohamad Hidayat's arrest on December 7, 2015.
The news portal reported that Mohamad Hidayat had been charged with entering Syria in 2014 where he became a member of the Jund al-Aqsa terrorist group, formerly a sub-unit of al-Qaeda according to the US State Department.
Police arrested Mohamad Hidayat when he arrived at Kuala Lumpur International Airport from Egypt.