Liberal Democrat leader Jo Swinson last night succeeded in a court bid to stop the SNP from distributing an election leaflet which accuses her of being a hypocrite over fracking.

She instructed lawyers to go to the Court of Session after learning of an election pamphlet which is being distributed in her East Dunbartonshire constituency.

In the leaflet, her Nationalist rival Amy Callaghan claims Ms Swinson is a hypocrite because she accepted a £14,000 donation from a “fracking company”.

However, lawyers acting for Ms Swinson claimed the statement is defamatory. They also sought an order from judge Lord Pentland which would stop the Royal Mail from distributing the leaflet. Shortly after 6.30pm, Lord Pentland ruled in favour of Ms Swinson.

He said her lawyers had shown they had a case to show the statement was potentially defamatory. He added: “The statement of which the petitioner claims of is, on the information which has been put before the court this evening, false in substance and materially inaccurate. “In my view the petitioner has shown she has a prima facie case that the statement is defamatory.” Lawyers for the SNP were notified of the legal action shortly before 4pm yesterday.

Ms Swinson launched the legal bid after learning of the leaflet’s contents. The leaflets were due to be distributed by the end of this week. The court heard a number of them had already been distributed and heard how the leaflet stated Ms Swinson was a “hypocrite” because she received money from Warwick Energy – the statement claimed Warwick was a “fracking company”.

However, Roddy Dunlop QC said the statements were incorrect. He said the £14,000 donation was made in a personal capacity by Mark Petterson, a director of the company.

He said Ms Swinson’s constituency office received the cash. Mr Dunlop said that, even though Warwick held licences for fracking, it did not participate in the controversial gas extraction activity and said the claims contained in the leaflet were incorrect. He added: “We are in the midst of a General Election. It is unlawful for there to be made a false statement of fact in relation to the personal character or conduct of a character.

“Mr Petterson made the donation in a personal capacity. It is not correct to say that the company is a fracking company – it holds licences for fracking but it is not engaged in it. Most of its activities come from renewable sources.

“Ms Swinson also did not receive the money. It was her constituency office. “Given that, the statement that she is a hypocrite is not only inaccurate, it is defamatory at common law.”

The SNP’s lawyer, Jonathan Mitchell QC, said that knowledge of the donations had been in the public domain for months. Lord Pentland ordered the SNP pay Ms Swinson’s costs.