MADRID (Reuters) - Spain’s lower house of parliament on Friday suspended four jailed separatist lawmakers who are on trial over their role in Catalonia’s failed independence bid in 2017.

The four men were elected on April 28 in a national election that delivered a deeply fragmented parliament.

Catalonia’s independence drive has overshadowed Spanish politics for years and is a major test for Pedro Sanchez’s Socialists after they won an election last month but fell short of a majority.

The jailed Catalans’ appearance in parliament on Tuesday, along with a 24-strong contingent of far-right lawmakers, led to a rowdy opening session.

Citing Spanish legislation and advice from the house’s legal experts, parliamentary speaker Meritxell Batet, told reporters on Friday: “Based on all these legal elements, we have to automatically declare that their rights as lawmakers are suspended.”

Batet, a Socialist, had over the past days insisted that the decision, which right-wing parties said should have come much faster, would not be political.

Oriol Junqueras, Jordi Sánchez, Jordi Turull, Josep Rull

are on trial on charges of rebellion, sedition and misuse of public funds relating to an independence referendum and subsequent unilateral declaration of independence by Catalonia in 2017. The Madrid government had banned the referendum and imposed direct rule on the northeastern region for a period.

The defendants deny the charges and say the trial is an act of political repression.

It was not immediately clear what would happen to the four lawmakers’ seats as it is up to them to decide if they want to leave them empty or if they would rather resign and pass the position to a fellow politician.

If the seats were left empty, this could work in favor of acting Prime Minister Pedro Sanchez as he would not need the backing of the Catalans to secure a second term as premier due to the numerical shift in parliament.

Batet said she had asked parliament’s legal experts to look into the impact of Friday’s decision on the number of seats.

The Catalan separatists reacted promptly.

“Denying the presumption of innocence... does not solve anything. From jail and as an elected deputy, I’m still betting on dialogue and democracy,” Jordi Sanchez said on Twitter.

Catalonia’s former leader Carles Puigdemont, who is in self-imposed exile in Belgium, said: “On Sunday, we must respond there where it hurts most: in the polls!”

Spain votes in European Union, regional and local elections on Sunday.