The teenager was arrested hours after the janitor was found injured near Pildammsparken in Malmö on February 8th. The man had been shot once in the leg and head and twice in the back, while being out clearing snow in the area, and was left with at the time life-threatening injuries.
"It was a miracle the janitor survived," Malmö District Court wrote in a statement on Friday as it sentenced the teenager to three years in a closed facility for young offenders which, unlike prison sentences for adult offenders, does not allow for early release in Sweden, meaning he is to serve the full punishment.
The teenager, who was also convicted of a narcotics offence, was 15 years and eight months at the time of the shooting. The court wrote that it had taken his young age into consideration.
In Sweden the age of criminal responsiblity is 15, but people aged under 21 get a reduced sentence (by how much depends on their age). However, if he had been older than 21 the sentence would have been 16 years' imprisonment, of which he would likely have served two thirds, regional newspaper Sydsvenskan reported.
The 16-year-old denies shooting the janitor and his lawyer said they would appeal.
"He has had that stance the whole time," his lawyer Sanna Herlin told the TT news agency.
"I think the evidence is weak and in a case where there is no motive, there's no explanation as to why it has happened, you have to be extra careful," she added.
The evidence used in the trial included an eye witness statement, shoe prints, tracked mobile phone movements and forensic evidence suggesting that the same kind of gunshot particles found on cartridges on the scene was also found on the teenager's clothes.
"The evidence was according to the district court sufficient to sentence the 16-year-old in accordance with the charges," wrote the court.
The practice of reduced sentence for young offenders has been hotly debated in Sweden recently, following reports of younger and younger people getting involved in gang crime. Prime Minister Stefan Löfven has said the government is looking into changing the practice.