Lawyers defending an East Renfrewshire woman jailed for embezzling cash from two Scottish independence groups have appealed against her conviction, claiming "a tsunami of tweets" were prejudicial and prevented her from receiving a fair trial.

Former SNP MP Natalie McGarry, 41, was handed a two-year prison sentence last July after being found guilty of stealing £19,974 while treasurer of the group Women For Independence.

She was also convicted of taking £4,661 when treasurer and convener of the SNP's Glasgow Regional Association.

McGarry, who served as MP for Glasgow East between 2015 and 2017, was then granted permission late last year to appeal against her conviction and sentence.

Defence agent Gordon Jackson KC said one of the grounds for the appeal was prejudicial material circulating on social media ahead of McGarry's trial.

He told an appeal hearing today that a series of "extremely nasty" tweets stopped the former MP from having a fair hearing because they influenced the jury.

Prosecutors, however, asked for the appeal to be refused, claiming jury members were not subject to prejudicial information at the time of the trial.

Mr Jackson read the content of several of the social media posts to the appeal court in Edinburgh, one of which stated: "This woman is guilty because she pled guilty before."

McGarry, of Clarkston, initially had her conviction for embezzlement quashed in 2019 after judges ruled she had suffered a miscarriage of justice before it went to retrial in 2022.

Other tweets mentioned McGarry had deliberately got pregnant to reduce her sentence, the court heard.

Mr Jackson, referring to the social media posts, said: "The Crown described that as minor prejudice.

"I do not agree with that – this is very, very serious prejudice."

Mr Jackson argued the Crown did not do enough to remove prejudicial material at the time of the trial.

He said that before the jury was warned about the Contempt of Court Act and issues with researching the accused on the internet, damaging social media posts were already in circulation.

"There was a scenario of tweets just before the trial started and the jury was empanelled," he added. "At that time, there was a tsunami of tweets."

Mr Jackson described them as "nasty, very personal, very unpleasant but, most importantly, majoring on the point that this is someone who has already admitted their guilt."

Lady Dorrian, the Lord Justice Clerk, presiding over the hearing, told the court there were three social media posts from the Crown "indicating the matter of contempt."

She said: "The Crown specifically posted warnings on Twitter on behalf of the court, so it's not accurate to say the Crown did nothing."

Mr Jackson replied: "But it wasn't linked to this case, it was just general.

"It's seriously prejudice material – 'this woman is guilty because she pled guilty before' in a deluge of tweets.

"In these prevailing circumstances, it's not good to proceed to trial.

"We need to think about what we do in the future about this. It's dangerous to the proper administration of justice."

On the matter of sentencing, Mr Jackson said "two years was excessive, given the circumstances."

Lady Dorrian asked advocate depute Alex Prentice KC to clarify the Crown's position, to which he replied: "I ask to refuse the appeal.

"The submission is that the jury couldn't be trusted and I think that's wrong.

"The sheriff gave a very strong warning not to research the case."

He said the jury "self-policed," before adding: "There is absolutely no basis to say this jury was corrupt in any way."

Mr Prentice asked the court to "dispel motions they (the jury) have picked up prejudicial information."

Lady Dorrian adjourned the hearing and said a decision on the appeal will be made "as soon as possible."