More than 500 people have been detained in Scotland on European Arrest Warrants for crimes including murder, rape and human trafficking.

The warrants allow EU states to demand the return of suspected criminals who have fled their home countries.

Most of the people arrested in Scotland since 2013 have been Polish nationals accused of serious crimes, according to figures obtained by STV News.

But the EU scheme has faced increased scrutiny since the arrest of Clara Ponsatí, a Catalan government minister who fled to Scotland following the 2017 independence referendum.

Her lawyer Aamer Anwar has accused Spanish authorities of abusing the system.

"There's been such a spotlight put on the European Arrest Warrant - it's the first time people have really looked at it - and it's exposed the fact that there are no real safeguards built into the system," Mr Anwar said.

"There have to be safeguards to stop countries abusing European Arrest Warrants. They were created for serious offences like murder and child abuse."

Twenty-two countries have issued 740 European Arrest Warrants (EAWs) for criminals in Scotland since 2013. Almost two thirds of them came from Poland.

Most EAWs are issued for violent criminals, drug dealers and sex offenders.

Ms Ponsatí has been charged with rebellion against Spain and misappropriating public funds used in the October referendum on Catalan independence, which was deemed illegal by the Spanish Government.

The Scottish Government has criticised Madrid's decision to prosecute Catalan ministers involved in the vote, including ex-President Carles Puigdemont.

However, Glasgow Caledonian University law lecturer Andrew Tickell said there is little Holyrood can do to intervene.

"The Scottish Government can't do anything - there's no question about that - and it would be improper if they tried," he said.

"The lord advocate is required to represent the interests of the foreign government.

"But there are human rights considerations built in. In order to extradite the sheriff has to be satisfied that there's nothing contrary to the European Convention on Human Rights like the right to a fair trial.

"There's also an issue of proportionality. The judge has to be satisfied that it's proportionate to send somebody back.

"The idea of extraditing somebody for vandalism would seem excessive and the same could be argued in the Ponsatí case."

The Spanish Government will be bound by the ruling made by Scottish courts, potentially tying the hands of prosecutors in Madrid.

"If the UK extradites somebody to Spain for an offence, then Spain is effectively prohibited from prosecuting them for any other offence than that," he explained.

"So it's really important what Scottish courts decide."

A total of 515 arrests have been made under EAWs in Scotland since 2013. According to police, it is likely most of the outstanding 225 warrants were wrongly issued for criminals who were not in the country.

At least eight warrants have been refused, including four for people accused of failing to pay child support, which is not a crime in Scotland. It is not essential crimes exist in both countries for EAWs to be upheld, however.

At least 60 EAWs have been issued for Scottish criminals abroad since 2013.

"The European Arrest Warrant system is valued by Scotland's police and prosecutors as it facilitates vital co-operation between criminal justice agencies of different EU states," a Scottish Government spokesman said.

"It has enabled the Scottish authorities to secure the transfer for trial of individuals wanted for serious crimes committed in Scotland and to transfer to other countries individuals who have ultimately been found guilty of serious crimes elsewhere."

"Ministers have made clear our profound regret that the Spanish government has not proceeded by way of dialogue with Catalan's political leaders and that the issue is now subject to a judicial process," they added.

"The fact that Scotland's justice system is obliged to act - and will act - in accordance with the law in relation to extradition requests does not change those views."

The total number of EAWs issued across Europe has risen significantly in recent years, from around 6900 in 2005 to more than 16,000 in 2015. Over 30,000 arrests have been made.