A 20-year-old man has been convicted despite his denial of the explosion in a block of flats in Norrköping in March this year, local media report.
The building suffered extensive damage during the explosion, but no one was physically injured.
The Norrköping District Court has sentenced the man to eight years' imprisonment for aggravated reckless endangerment and serious offences against the law on hazardous and explosive goods.
The man, who is from Borås, has previously been sentenced to youth care on several occasions.