Aydin Sevigin was arrested in February, suspected of having tried to build a bomb. Police found six bottles of aceton, duct tape, a mobile phone and bullets during a search of his home. A receipt for Christmas tree lights and surveillance footage showing him buying a pressure cooker from Ikea were also part of the case.
The 20-year-old, who grew up in the well-off suburb Danderyd north of Stockholm, denied the claims, but refused to explain why he bought the ingredients, which can be used to build bombs.
"My opinion is that he acquired, stored and collected liquids and objects to make and then blow up a suicide bomb in order to become a martyr. The criminal act being prepared could seriously have hurt Sweden," prosecutor Ewamari Häggkvist said ahead of the verdict.
Attunda District Court, north of Stockholm, sentenced him to five years in jail on Thursday morning for "preparing to commit a terror crime".
It said it had reduced the sentence by one year because he is aged under 21.
"It is not clear what would have been the target of a bomb attack. But we believe that blowing up a shrapnel bomb of this kind would have been able to harm Sweden and that the purpose of such a bomb must have been to instil fear in the way referred to by terrorism legislation," said the chairman of the court, Mikael Swahn, in a statement.
Sevigin's relatives had raised the alarm several months before he was arrested. In June last year one of his family members called the police, saying he was concerned about the 20-year-old, who had then disappeared.
He was shortly thereafter stopped in Turkey on two occasions. The first time he was made to return to Greece, the second time he was flown back to Sweden from Istanbul. His intention is believed to have been to travel onwards to Syria to join Isis.
Several of his relatives stated during the investigation and trial that the 20-year-old had been experiencing symptoms of depression, isolating himself from others and expressing radical opinions sympathizing with Isis.
It was not immediately known if his legal team would attempt to appeal the sentence.
The verdict came on the same day as a separate terror trial got under way in Sweden. A 25-year-old man is charged with attempting to travel to Syria to join a militant group. The trial is the first of its kind applying Sweden's new anti-terror laws making it illegal to travel abroad to join terror organizations.