After the referendum held in October 2017 for the independence of Catalonia from Spain, the regional parliament was dissolved and elections anounced for December.
In these elections, the separatist parties Junts per Catalunya and Esquerra Republicana de Catalunya presented candidates that at the time were indicted by the Spanish Attorney General for rebellion, sedition and embezelment and sought with an arrest warrant. Several were elected, but some of them (most prominently former regional President Carles Puigdemont) evaded arrest by fleeing the country.
Three were arrested and at the day of the election in December 2017 were remanded in custody: Joaquim Forn, Jordi Sanchez and Oriol Junqueras. The magistrate at the Supreme court in charge of investigating the case denied them leaving prison for taking part in proceedings, citing fears of "serious public confrontations" on occasion of their transfer. But he permitted them to delegate their votes to other members of parliament:
Se reconoce a estos la posibilidad de delegar su voto, teniendo que administrarse su ejercicio por Mesa del Parlamento.
The latter shall have the right to delegate their vote, the exercise of which shall be administered by the Board of the Parliament.
Despite initial reservations, the Board of the Parliament decided to allow this procedure.
Joaquim Forn resigned from parliament in January 2018. In 2019, he stood for the Barcelona city council elections and took office in June.
Josep Rull and Carme Forcadell were elected to the parliament and free at the time of the election, but were remanded in custody in March 2018 together with a few other former members of the Puigdemont government.
The imprisoned members of the parliament were banned from participating by an order of the Spanish Supreme Court in Juli 2018, when the case was admissed to court.
Several attempts were necessary to find a new President of the Catalan region. First, Carlos Puigdemont was ruled by the Supreme Court to not be able take office from abroad. Then, it ruled Jordi Sanchez would not be released from jail to attend his investiture ceremony. Jordi Turull stood for a first vote by the regional parliament, but did not gain a majority. Only days later, he was also remanded in custody. Finally in May, Quim Torra (not indicted) was elected.
Jordi Sanchez and Josep Rull were elected in 2019 to the Spanish Congress of Deputies, Raül Romeva, another jailed politician, to the Senate, and were sworn in as members, but their respective membership was suspended by the Board of the Congress after a recommendation by the Spanish Supreme Court.
The trial took place in 2019, and the separatists were sentenced to several years in jail. They remained there until they were pardoned by the Spanish government in 2021.
According to one press article, 2023 the crime of rebellion was withdrawn from the Spanish Penal code. But it is still present in official versions.