Catalonian politician Clara Ponsati has vowed to fight an attempt to extradite her to Spain over charges relating to her role in last year's independence referendum.

The University of St Andrews professor met the Catalonian President Quim Torra in Edinburgh on Wednesday as she prepares for her case to be heard in the Scottish courts.

The Spanish authorities have accused her of violent rebellion and misappropriation of public funds.

President Torra, who backs independence for the region, was sworn in by Catalonia's parliament in May.

During a meeting of the two leaders on Wednesday, Torra extended an invitation to Sturgeon to visit Barcelona, which she accepted.

The offer comes as Spain and Catalonia try to move towards a new phase of constructive engagement with each other.

No date has yet been set for the visit.

Prof Ponsati said: "These are huge, very, very serious accusations. If they were to succeed I would spend time in prison, I know.

"If not I will spend time in exile, that's tough as well. I don't want to cry, I just want to fight."

Referring to Spain's centuries-old laws on treason, she said: "I just find the whole situation surreal.

"If it were to succeed we would be seeing one more episode of Outlander."

President Torra said he did not believe the Spanish government would back down over the criminal charges brought against former members of the Catalan regional government.

However he was confident Prof Ponsati and Catalan ex-ministers who are facing similar charges in other European countries would win their extradition cases.

He said: "In these countries, there's a separation of powers, the judicial system is neutral.

"So we hope that we will win the extraditions in the four countries."

He welcomed support from the Scottish people and the SNP for Prof Ponsati's case.

He added: "Imagine Clara, 61 years old, in prison for 15, 20, 25 years, just for opening some schools in Catalonia to let the people vote.

"It's absolutely unbelievable."

Ms Ponsati's legal team, who describe the prosecution as "politically motivated" by Spain, say she could face a total sentence of up to 33 years if she is sent back and convicted of the charges, raising fears the 61-year-old could spend the rest of her life in jail.

Her team maintains that the condition of "dual criminality" - the issue of establishing equivalent charges in Scots law - is not fulfilled, and a European arrest warrant should not be executed.