Carles Puigdemont after receiving his MEP badge | Anne-Laure Mondesert/AFP via Getty Images Puigdemont picks up MEP badge after court boost Catalan leaders were elected in May but haven’t been able to take their seats.

Bolstered by a court ruling, Carles Puigdemont showed off the badge that will let him enter the European Parliament and declared that he and a fellow Catalan separatist will "continue to defend our rights."

Standing outside the Parliament's accreditation office in Brussels on Friday, Puigdemont said: "Now we will enter the Parliament and we will enter as MEPs."

Puigdemont, Catalonia's ex-president, and Toni Comín, his former health minister, were elected to the Parliament in May but had been blocked from taking up their seats and denied access to the Parliament's buildings because Spanish officials don’t recognize them as MEPs. Both fled to Belgium to avoid charges in Spain over their role in a failed secessionist push in 2017. Spanish officials won’t recognize them as MEPs unless they swear a constitutional oath in their home country, where they face arrest.

But on Thursday, the Court of Justice of the European Union ruled that another former Catalan leader, ex-vice president Oriol Junqueras, who was also elected as an MEP in May, should have been allowed to leave jail to take up his MEP seat. The court said he should have enjoyed the immunity afforded to MEPs from the moment the EU election results were declared. Junqueras was sentenced in October to 13 years in prison for his role in the 2017 independence push.

On Friday, the Court of Justice also annulled a lower EU court’s decision to deny provisional measures that would have let Puigdemont and Comín take their seats in July. It said the lower court “made a mistake” and must now reexamine the case.

Waving his badge, Puigdemont said: "We are six months behind but now we are here, and we are going to make use of this to continue to defend our rights.”

Puigdemont and Comín were also encouraged by Parliament President David Sassoli, who said at a plenary session in Strasbourg on Thursday that the CJEU ruling "directly affects the composition" of the legislature and urged "the competent Spanish authorities to align with the ruling."

A Parliament spokesperson said Friday the badges given to the two Catalans were temporary and the Parliament's legal team still needed to examine the CJEU ruling on Junqueras. Puigdemont and Comín would have to show up again in January to complete their formal accreditation, the spokesperson said.

Puigdemont expressed relief at the EU court ruling, but noted many Catalans had been left without representation since he and his colleagues were elected but not allowed to take their seats.

"My worry about our personal compensation is zero," Puigdemont told reporters. "The question is how do they intend to compensate the European citizens who haven't been able to participate, for example in the commissioner hearings, who haven't been able to be present in key decisions for this mandate, or in some key votes, such as one regarding migration that was lost by two votes which if we had been there would have gone through."

"So the question is, what mechanisms does the EU have to compensate the millions of European citizens who've been left without a voice and without being able to participate?" he added.

Puigdemont was the lead candidate for the Junts per Catalunya (Together for Catalonia) party while Comín is from the Socialist Party of Catalonia.

It is still unclear which political group Puigdemont and Comín would join, but they were accompanied on Friday by Belgian MEP Assita Kanko, a vice-chair of the European Conservatives and Reformists and a member of the right-wing, pro-independence New Flemish Alliance (N-VA).

Puigdemont and Comín could also join Junqueras in the Greens group, which includes two other Catalan MEPs.

Arnau Busquets Guàrdia and Emma Anderson contributed reporting