Three men with links to an extremist group were Friday given prison sentences for recent attacks in southern Sweden targeting newly arrived migrants and a left-wing group.

The Goteborg District Court found Viktor Melin guilty of attempted murder and endangering, and sentenced to eight years and six months in prison. He was convicted for three incidents — an unexploded device found Jan. 25 near a campsite accommodating migrants, a Jan. 5 bomb that seriously injured one person, and a blast in November outside a left-wing group's offices in Sweden's second largest city, Goteborg.

Jimmy Jonasson's sentence was five years and Anton Thulin's was 18 months. They were acquitted of attempted murder.

The court said Melin, 23, made all three bombs while Jonasson, 51, provided dynamite and other material for the Jan. 5 bomb. Thulin, 20, provided components for the Jan. 25 attack but the device failed to explode.

In its verdict, the court said "the crimes are so serious that other punishment than imprisonment can't be applied."

Melin's lawyer Michael Hansson told the Swedish news agency TT that they hadn't decided yet whether to appeal, adding he thought the ruling lacked "a bit of reasoning."

During the three-day trial that started June 21, prosecutors said the men seemed to be "dissatisfied with the leadership" of the white-supremacist Nordic Resistance Movement for not using violent means to achieve their ends. All had been members of the NRM.

The Swedish security service SAPO has been part of the investigation that led to the arrests of the men in February and March.