SKOPJE, Macedonia — A Macedonian court on Thursday convicted seven men of attempting to murder a lawmaker during a mob invasion of parliament at the height of the country's political crisis last year.

The Skopje court imposed sentences ranging from 10 to 13½ years in prison on the defendants. Their lawyers plan to appeal.

Zijadin Sela, leader of the small Alliance of Albanians party, was severely beaten by protesters during the April 2017 invasion, in which some 100 people were injured. He was hospitalized unconscious for 10 days and suffered brain damage and memory loss.

Judge Slavica Andreevska said the defendants had intentionally tried to murder Sela, pulling him out from among the other lawmakers.

Prosecutor Darko Jakimovski said that Sela is still alive only because the defendants mistakenly believed that they had killed him.

The riot came amid high tension between the formerly dominant conservative party and current Prime Minister Zoran Zaev's left-led coalition following inconclusive parliamentary elections.

The injured included police officers, lawmakers and journalists.

Parliament had been meeting to elect an ethnic Albanian speaker, as a first step for Zaev's coalition to form a government.