The teenager was sentenced to a year in prison by a court in Vienna, but told that she would not have to spend any further time in jail because she has been in custody since her arrest last year.
"It has been the worst time of my life. Now I just want to go home," the school girl told Swedish newspaper Dagens Nyheter just after the verdict was announced.
"I am happy that my client is free, that was the goal. My client is happy to leave Austria," added her lawyer Wolfgang Blaschitz.
"It is not necessary to further detain the defendant," judge Andreas Hautz said, adding that it was important that she be allowed to return home "and that Swedish youth welfare authorities should take appropriate measures" while she is on probation.
She was arrested on December 5th at Vienna’s Westbahnhof rail station, after her parents reported her missing from her home in Linköping in southern Sweden and told police they suspected she had become radicalized after watching Isis videos. They were able to track her, using her mobile phone, to Vienna.
The girl’s lawyer, Wolfgang Blaschitz, said she ran away from home because she was "naive" and unhappy, and had no final destination in mind. He told the judge that she had never had any contact with Islamic State members.
She travelled to Vienna without a passport by bus and train, via Gothenburg, Malmö, Copenhagen, Hamburg and Munich.
She had only €171 in cash when she arrived in Vienna, and she told the judge that she planned to meet with three girls who, like her, have Somali roots. She claimed that she wanted to do some sightseeing in Vienna with the girls, who she had never met before.
However, the prosecutor said she planned to travel to Syria via the Balkans to join jihadist fighters. When police examined her mobile phone records they reportedly found incriminating evidence including Isis propaganda material that she had saved on her phone and messages such as "But if they cannot be converted, they must be killed".
They also found messages in which she expressed happiness about the November 13th Paris terror attacks.
The Austrian prosecutor said that Isis propaganda photos were also found on her phone, “including images of beheadings and other atrocities”. A spokesman for the prosecutor told local media that it was clear that she was trying to persuade other young people to join Isis and that "she intended to marry an Isis fighter in Syria”.
Story continues below…
After her arrest Sweden did not request that she be extradited as under Swedish law preparing for a trip to join the jihad is not currently a criminal offence - although it is in Austria.
Her parents travelled to Vienna for the trial, and her lawyer said that his priority was to make sure she can return to Sweden as soon as possible.
She has not been named by Swedish or Austrian media due to her age, but was reportedly born and raised in Sweden. She was attending a high school in Skäggetorp, an area of Linköping with a growing proportion of immigrant families and higher than average unemployment.