An Austrian court has convicted four men of terrorist offenses and participation in murder over their alleged links to a sympathizer of the Islamic State group who carried out a deadly shooting in Vienna in 2020.

Two of the men were sentenced to life in prison by the Vienna state court on Wednesday night and the others to 20 and 19 years, respectively, the Austria Press Agency reported.

Another two defendants were acquitted of the main charges, but were convicted of membership in IS and spreading the group's propaganda. They were given partially suspended two-year sentences.

AUSTRIA'S GOVERNMENT ORDERS 4 RUSSIAN DIPLOMATS TO LEAVE THE COUNTRY

Austria Vienna Attack

Police officers guard the scene of attack in Vienna, Austria, on Nov. 3, 2020. (AP Photo/Matthias Schrader, File)

CLICK HERE TO GET THE FOX NEWS APP

Four people were killed in the attack on Nov. 2, 2020, and the gunman also died. More than 20 other people, including a police officer, were wounded. Assailant Kujtim Fejzulai, a dual national of Austria and North Macedonia, had a previous conviction for trying to join IS in Syria.

The six men who went on trial in mid-October weren’t accused of direct participation in the attack, but they allegedly helped or influenced Fejzulai as he prepared for the shooting. In one case, those alleged activities included procuring the weapons used in the shooting.