The shooting occurred on the Stockholm island of Södermalm in August last year. Police took the victim to hospital where he later died of his injuries.
"He was hit by several shots, some of which hit him in the face," Peter Matilainen of the Stockholm police told the TT news agency at the time.
The shooter, a 37-year-old man, was sentenced on Friday for homicide and aggravated weapon crimes.
Another man and woman were also sentenced for protecting a criminal. They were sentenced to prison for four months and one year respectively.