FILE - In this Feb. 18, 2019 file photo, Catalonia's former regional president. Carles Puigdemont, addresses a conference in Brussels. Spanish political party officials said on Monday, April 29, 2019, that Spain's Electoral Board has ruled that Puigdemont and two other Catalan separatists who fled abroad to escape arrest can’t stand as candidates in next month's European Parliament elections. (AP Photo/Francisco Seco, File)

MADRID (AP) — Catalan regional ex-president Carles Puigdemont and two other separatists who also fled abroad to escape arrest must be allowed to run in this month's European Parliament elections, Spanish courts ruled Monday.

The judgments overruled a decision by Spain's Electoral Board, which had said it would prohibit the three from running in the May 26 race to fill the country's allotted seats at the parliament in Strasbourg.

Three separate courts in Madrid ruled in favor of appeals filed by Puigdemont and his two associates, who argued that their democratic rights were being violated.

All three separatists fled Spain to avoid arrest for participating in Catalonia's failed secession attempt in 2017. Puigdemont and Toni Comín reside in Belgium, and Clara Ponsatí in the U.K.

It appears that even if elected they wouldn't be able to take their seats since that would require them to first go back to Spain to receive their official parliamentary credentials in person. They are still wanted in Spain and would face arrest.

A dozen other separatist leaders who stayed in Spain are currently undergoing trial at Spain's Supreme Court in Madrid.