A former Catalan politician has said she will continue to fight for the freedom of others after an international warrant for her arrest was formally dropped.

Professor Clara Ponsati was told she was “free to go” during a hearing at Edinburgh Sheriff Court on Monday which lasted less than five minutes.

The St Andrews University academic’s legal team had been preparing to fight her extradition to Spain until last week when the authorities in Madrid withdrew a European Arrest Warrant she was subject to.

Sheriff Nigel Ross formally discharged her from the warrant in what was hailed as a “humiliating defeat for the Spanish state”.

Speaking outside the court Prof Ponsati said she was “determined to keep fighting for the freedom of all political prisoners, for civil rights in Catalonia and Spain and for the Republic of Catalonia”.

In a statement, her solicitor Aamer Anwar said the warrant was a “monstrous distortion of the truth” which had “backfired spectacularly”.

Prof Ponsati along with solicitor Aamer Anwar (David Cheskin/PA)

He said: “This is a humiliating defeat for the Spanish state which since October 1 has unleashed a wave of repression, attacking the Catalan people, suspending their government, jailing or trying to jail independence leaders.

“The Spanish state systematically used law as a weapon of war to try and eliminate their Catalan opponents, but they have persecuted not just politicians but also teachers, comedians, poets and rappers.

“The decapitation and liquidation of the Catalan Government was the sole-purpose of the European Arrest warrants as Spain twisted and broke the law, but in court after court across Europe, Spain’s reputation has been damaged, the failures are spectacular and ultimately the warrants were withdrawn through the fear of failure.

“Clara, an esteemed university professor, if extradited faced up to 33 years for peacefully promoting a referendum.

“The European Arrest Warrant was never meant to be used as a tool of political repression and we would ask for both the Scottish and UK Government to raise such abuse with their European Union.”

He said the withdrawal of the warrant was a “tremendous victory” but added: “There can be no mood for celebration whilst nine Catalans are held as political hostages and Clara remains a political exile unable to return home for at least 20 years.”

Prof Ponsati is still subject to national warrants in Spain and her legal team remained on “standby” for a reissued European Arrest Warrant, he added.

Authorities in Madrid were seeking the ex-Catalan education minister on charges of violent rebellion and misappropriation of public funds over her role in Catalonia’s controversial independence referendum in 2017 – charges she has consistently denied.

Warrants for five other politicians who were wanted for their roles in promoting the Catalonia region’s independence, including former regional president Carles Puigdemont, were also withdrawn by Spanish Supreme Court judge Pablo Llarena last week.

The move followed a German court ruling that Mr Puigdemont could not be sent back to Spain for rebellion, only for embezzlement connected to the alleged misuse of public funds for a referendum on secession.