A former SNP MP found guilty of stealing almost £25,000 from two Scottish independence groups has lost her appeal against her conviction.

Lawyers acting for Natalie McGarry, who was elected as Glasgow East MP in 2015, had claimed in her appeal that her embezzlement trial was prejudiced by a "tsunami" of Twitter posts saying she was already guilty ahead of the full hearing.

But, on Thursday, the Court of Criminal Appeal rejected her appeal, confirming "there were strong enough safeguards in place" to give the 41-year-old a fair trial.

Lady Dorrian, who gave the judgment, compared the social media posts to "the modern day equivalent of gossip and tittle-tattle at the bus stop or the pub".

She said the jury was given "four-and-a-half pages" of instructions to "put out of their minds anything they may have read in the past about the accused or circumstances relating to the charges".

She added: "These were thorough and careful directions, making the position abundantly clear, and there is no basis for thinking that the jury did not follow them."

Judges refused the appeal against conviction but McGarry's sentence of two years was changed to 20 months.

McGarry was found guilty of stealing £19,974 while treasurer of Women For Independence. She was also convicted of taking £4,661 while treasurer and convener of the SNP's Glasgow Regional Association.

She was jailed for two years following the trial in June last year.

Gordon Jackson KC, who was defending McGarry, insisted she was the victim of a miscarriage of justice because of the posts about her circulating on social media ahead of the trial at the High Court in Glasgow last year.

He previously told the court there was "a tsunami of tweets just before the trial started and the jury was empanelled" which he described as "nasty, very personal, very unpleasant but most importantly, majoring on the point that this is someone who has already admitted their guilt".

He claimed they would have influenced the jury, and that the Crown did not do enough to remove them at the time.

But in the judgment, Lady Dorrian concluded: "The question is whether these posts presented a degree of prejudice to the fairness of the trial, in respect of the independence of the tribunal, so grave that no direction of the trial judge, however careful, could reasonably be expected to remove it.

"We are satisfied that this is not such a case... there were other strong safeguards which enabled a fair trial to take place."