Alistair Carmichael has been cleared by election court judges and will remain the MP for Orkney and Shetland after a legal challenge to his election.
Four of Carmichael's constituents crowdfunded an attempt to oust Scotland's only Lib Dem MP, claiming that his election was unjust as he had purposely misled voters over a memo leaked to the press ahead of the general election.
An election court heard evidence from witnesses in September and November, and judges announced on Wednesday that Carmichael was "duly elected and that his election was not void".
In a statement on the Scottish judiciary website, the judges concluded that Carmichael told "a lie" when he said he first heard of the memo leak from reporters, but judges were left in "reasonable doubt" as to whether it was illegal.
The memo, published in the Daily Telegraph after it was leaked from Carmichael's office, stated that Nicola Sturgeon would secretly prefer David Cameron to be prime minister than then Labour leader Ed Miliband. Carmichael originally told Channel 4 he was unaware of the leak, but after the election admitted he had been "less than fully truthful".
Election court judge Lady Paton said: "We are not persuaded that the false statement proved to have been made was in relation to anything other than the first respondent's [i.e. Carmichael's] awareness (or lack of awareness) of a political machination.
"Accordingly we are not satisfied beyond reasonable doubt that the words used by the first respondent amounted to a 'false statement of fact in relation to [his] personal character or conduct'.
"It follows that we are not satisfied beyond reasonable doubt that an essential element of section 106 has been proved."
Carmichael welcomed the ruling, but said the case against him had been "politically motivated" and a "deliberate attempt by nationalists" to remove him from parliament.
"I am pleased with the decision of the court," said Carmichael. "Although I was always confident of winning the last few months have been a difficult and stressful time for me and my family.
"We have been enormously grateful for the tremendous levels of support received from local people, in both Orkney and Shetland, regardless of which political party they normally support. This support has sustained us and we are very thankful for it."
He continued: "This case was politically motivated. It was a deliberate attempt by nationalists to remove the last Scottish Liberal voice at Westminster, and is a mark of the unhealthy polarisation of Scottish politics since the referendum.
"I shall continue to represent Orkney and Shetland as a member of parliament to the best of my ability, as I have done for the past 14 years."
A Lib Dem source confirmed to BuzzFeed News that Carmichael will now seek to recoup legal costs of "around £150,000" from the four petitioners, whose original crowdfunder just to cover their own legal fees reached £167,000.
One of the people who challenged Carmichael, Tim Morrison, told BBC Radio Orkney that Carmichael "has been found by the court to have lied to his electorate".
Morrison added: "The fact that he has won has not exonerated him."
An SNP spokesperson said: "As today's determination makes clear beyond reasonable doubt, Alistair Carmichael told a 'blatant lie' to improve his chance of re-election.
"While he prevailed in the election court on a strict interpretation of the law, it is much more doubtful that he or his party will survive the court of public opinion."
Jamie Ross is a Scotland reporter for BuzzFeed News and is based in Edinburgh.
Contact Jamie Ross at firstname.lastname@example.org.
Got a confidential tip? Submit it here.