Once elected, Junqueras enjoyed an immunity that “entails lifting any measure of provisional detention imposed prior to the declaration of that member's election,” ECJ president Koen Lenaerts said.
Reading the judgement, Lenaerts said anyone elected to the European Parliament enjoys the the legal immunities of an MEP from the moment that results are declared.
At the time of May's European parliamentary election, Junqueras was in pre-trial detention in Spain facing charges linked to his role in organising a banned Catalan independence referendum.
He nevertheless won office, but was prevented from leaving jail to attend a Spanish swearing in ceremony, and thus from travelling to Brussels to take up his post.
The consequences of Thursday's ruling are unclear.
The Luxembourg-based court's ruling appears to invalidate the decision of the Spanish Supreme Court in July to prevent Junqueras from being freed from pre-trial detention.
But since then, in October, Junqueras was sentenced to 13 years in prison and disqualification from public office for sedition and embezzlement of public funds.
It is now up to the Spanish Supreme Court to decide on the appeal filed by the former Catalan vice-president's defence team. After the ruling, his party, the ERC, demanded “the nullity of the trial and his immediate release.”
The judgement also paves the way to the European Parliament for former regional president Carles Puigdemont and his health minister Toni Comin, who moved to Belgium to avoid legal proceedings in Spain.
Both were also elected to the European Parliament in May, but they were also unable to take office because they did not travel to Madrid for the Spanish swearing in ceremony.
“A person who is elected to the European Parliament acquires the status of Member of Parliament as a result of and from the time of the declaration of the election results,” the ECJ ruled.
- Amnesty International demands immediate release of jailed Catalan leaders
- Catalan exiled leader sues for right to take MEP seat