CATALAN President Quim Torra has called for the immediate release of independence leaders currently on trial in Madrid after a UN body described as “arbitrary” the detention of Oriol Junqueras, Jordi Sanchez and Jordi Cuixart.

In a report, the UN Working Group on Arbitrary Detention said their detentions violated their rights to freedom of expression, demonstration and participation and said they were in jail “for their political ideas”.

READ MORE: Catalan trial: UN working group demands release of prisoners

In a statement, Torra said: “Our political and social representatives should never have entered prison because they have defended the democratic rights of all Catalans,”

“This is a resolution taken by the highest authority and international authority in this area and anyone who intends to minimise it or reduce its value will be mistaken.

“Their resolutions are mandatory and if the Kingdom of Spain does not comply they will be in violation international law. It is a demolishing resolution for Spain.”

His remarks came after his predecessor, Carles Puigdemont, and former minister Toni Comin were barred from entering the European Parliament in Brussels on Wednesday.

The National: Former Catalan president Carles Puigdemont faces a battle to take his seat as an MEPFormer Catalan president Carles Puigdemont faces a battle to take his seat as an MEP

Both were elected as MEPs in the European elections, despite being in self-imposed exile in Belgium.

Puigdemont described the decision as a “dirty game”, and added: “We hope the European Parliament doesn’t follow the same path as the Spanish authorities and their tendency to violate fundamental rights. We won the elections in Catalonia, but the ‘democratic’ general secretary of the European Parliament considers that our voters are less respectable than the rest.

“Is this the real European democracy? We will continue to fight for freedom, for human rights.”

A spokesperson for the European Parliament said it could only issue accreditation papers to MEPs once it had received the national lists with the details of those who have been elected.

READ MORE: Catalan MEPs prepare for legal battle to take seats in Europe

Puigdemont, Comin and jailed former vice-president Junqueras will have to swear an oath of allegiance to the Spanish constitution in Madrid before being allowed to take their seats in Brussels.

However, the former president and Comin face arrest should they try to enter Spain.