MADRID (Reuters) - Former Catalan deputy leader Oriol Junqueras, standing trial in Madrid for rebellion, said on Thursday he was a political prisoner and insisted his region had the right to secede from Spain.

Former Catalan Vice President Oriol Junqueras testifies before judges during the trial of jailed Catalan separatist leaders at the Supreme Court in Madrid, Spain, February 14, 2019 in this screengrab taken from video. REUTERS/Reuters TV

Junqueras is the most prominent of 12 Catalan leaders being tried at the Supreme Court since Tuesday over a failed independence bid in 2017, in a landmark case that has laid bare deep social divisions and triggered Spain’s biggest political crisis in decades.

“I am convinced that I am being accused for my ideas and not for my deeds,” he told the court.

“...I was dismissed as deputy head of the Catalan government after (Madrid took control)... and because of that I believe I am a political prisoner”.

Madrid closed down the region’s parliament and took over its government after Catalonia declared independence in October 2017.

That declaration followed a referendum on secession, deemed constitutionally illegal by the courts and to which central government responded by sending riot police.

Heavy-handedness by the security forces in trying to prevent the vote led to widespread criticism.

Asked by his lawyer about that day, Junqueras said: “Voting is not a crime but it is a crime to prevent people from doing so using force.”

He rejected any suggestion he had incited violence - a necessary component of any conviction for rebellion under Spanish law - during the vote.

Junqueras, who along with his co-accused faces up to 25 years in jail if found guilty on that charge, still chairs the ERC, the left-wing pro-independence party that governs Catalonia alongside the conservative PDeCAT.

He has been in jail since November 2017.

In testimony that veered from quietly spoken to emotional, Junqueras at one point apologized for his sometimes rambling answers.

“If at times I’m a little passionate in my answers, it’s because I’ve been a year and a half without being able to talk,” he said. He declined to answer questions from prosecutors.

The defendants and their supporters say they are political prisoners, while the government says they are being judged strictly in line with the rule of law.

Nine of 12 are already in detention while the three others, who face a maximum of seven years in jail on lesser charges, are on bail.