Catalan separatist Clara Ponsati has not set foot in her native Barcelona for two years for fear of the Spanish authorities. But her circumstances could be about to change thanks to Brexit.

The former education minister in the Catalan regional government of Carles Puigdemont is wanted in Spain for alleged sedition over the failed 2017 independence bid.

An economics professor at St Andrews University in Scotland, her extradition case in being heard at the courts in Edinburgh.

But once Britain leaves the EU on Friday, she will automatically become a member of the European Parliament (MEP) – something she believes will give her immunity from extradition.

After Brexit, additional MEPs elected in the remaining member states will be installed to fill empty seats left behind by the outgoing British deputies.

Following the May 2019 European Parliament elections, Ponsati is due to take one of the five seats reallocated to Spain, as an incoming MEP for the Together for Catalonia party.

Once Ponsati joins the European legislature, the 62-year-old hopes to benefit from immunity, as Puigdemont and a former Catalonia health minister Toni Comin already do as MEPs.

“Once I become an MEP, I get immunity from prosecution – and that means that the Spanish justice should withdraw the order of arrest against me,” Ponsati said at her home in the small Scottish town of Leuchars.

“I should be free to walk in Barcelona without being threatened with arrest.”

However, Ponsati knows that the Spanish authorities may not give in so easily.

Madrid has not withdrawn the arrest warrants issued for Puigdemont and Comin.

The Belgian judge who examined their extradition requests decided to suspend them when they became MEPs, meaning they can freely move around Europe – although, as a precaution, they do not return to Spain.

Ponsati believes the Scottish courts will be sensitive to her case.

“It’s for the Scottish judges to decide what the implications of my MEP status are. I trust justice in Scotland,” she said.

Furthermore, with Brexit, the European Arrest Warrant could lose its validity in the UK and have to be replaced by an international extradition request, starting a complex process which Ponsati could claim was politically motivated.

“The fact that Spain is not respecting European law certainly affects how external judges see the way Spanish justices are managing the conflict in Catalonia,” she said.

After voluntarily going to the Scottish police in November, Ponsati was released on bail.

Her extradition case is due to begin on May 11, following a preliminary hearing on March 5 which could decide on her immunity claim, as she will be an MEP by then.

She has raised more than £166,000 ($217,000) in online donations towards her legal costs.