Somalian citizen Libaan Ahmed Warsame has also been sentenced with conditional deportation from Denmark.
He was found guilt of making and storing a bomb in the basement of an apartment building on the Peter Fabers Vej residential street in Aarhus.
The device was discovered by a resident in the building in October 2016, and the area was closed off for several areas as armed police evacuated the block and arrested Warsame.
A bomb disposal unit was also despatched to neutralise the device.
The bomb consisted of two explosive components weighing 200 grams, a fuse, detonator and a number of metal objects.
It had the potential to “cause significant damage to surrounding objects and be of great danger to nearby persons,” according to the charge sheet against Warsame.
The 25-year-old’s fingerprints were found on the bag in which the device was stored.
Warsame has denied the charges against him through the trial and also appealed against the initial guilty verdict at Aarhus City Court.
The verdict has now been upheld by the higher Vestre Landsret court.
Though the 25-year-old’s intended purpose for the bomb remains unclear, he has been linked to gang violence in Denmark’s second city.