Image caption Quim Torra met Nicola Sturgeon at her Bute House residence in Edinburgh

Scottish First Minister Nicola Sturgeon has welcomed Quim Torra, the president of Catalonia, to Bute House.

Mr Torra was sworn in as leader of the devolved Catalan parliament in May, after months of turmoil in the wake of a contested independence referendum.

A former minister in the regional government is facing extradition from Scotland to Spain over the vote.

Mr Torra said he wanted to thank Ms Sturgeon for her backing, and to thank Scots for supporting Clara Ponsatí.

The St Andrews University professor faces being sent back to Spain on charges of rebellion and misappropriation of public funds over her part in the October 2017 vote, where she could be jailed for more than 30 years.

Prof Ponsatí was a member of the Catalan government which held the vote and subsequently made a unilateral declaration of independence. This was rejected by Madrid, which then suspended autonomy in the region - with direct rule only being lifted in June 2018 when Mr Torra's government was sworn in.

Mr Torra met Nicola Sturgeon at her Bute House residence in Edinburgh, saying he wanted to thank her for her support for Catalan self-determination.

Image caption Quim Torra said he would respect any decision Scots made about their future

Following the meeting in Edinburgh, the two political leaders issued a joint statement agreeing that "the way forward for Catalonia must be through peaceful and democratic solutions involving dialogue between the Spanish and Catalan authorities".

They said that "in 21st century Europe, issues of self-determination must ultimately be addressed through democratic referendums", which should be "agreed between both parties and have corresponding international recognition".

However, Mr Torra also told BBC Scotland that it was "absolutely" right for the Catalan referendum to go ahead without the permission of the Spanish state.

He said: "In the Catalan case, after years and years trying to get this referendum agreed with Madrid, with the impossibility to do it in an agreed way, we decided to do it by ourselves.

"Each nation knows the moment in which its necessary to do things, to preserve the dignity of the nation. Maybe Scotland in the future has to take a decision like that. I don't know, but I respect for any decision the Scottish people might take in the future."

Mr Torra added that "in the 21st century, I can't imagine another way to solve the issues politically than voting", and said that the model of the 2014 Scottish referendum, underpinned by an agreement between the Edinburgh and London governments, was "the best example".

Image copyright EPA Image caption Mr Torra also met Clara Ponsati and her lawyer Aamer Anwar in Edinburgh

Before heading to Bute House, Mr Torra met Prof Ponsati and her lawyer, Aamer Anwar.

The Spanish state charges Prof Ponsati her with rebellion and the misuse of public funds over the 2017 vote, which it considered illegal.

She can only be extradited if a Scottish court decides that the offences she is accused of would constitute crimes here, and prosecutors hope to use a treason offence of "levying war in the realm" - which dates back to 1351.

Prof Ponsatí denies the charges against her, and said the "surreal" attempt to extradite her was like "an episode of Outlander".

The court case to decide her fate is expected to run through much of August at the Sheriff Court in Edinburgh.