Alex Salmond has been cleared of sexually assaulting nine women while he was Scotland's first minister.
A jury found the former SNP leader not guilty on 12 of the sexual assault charges facing him, while another was found not proven.
A further charge of sexually assaulting a 10th woman had previously been dropped by prosecutors.
Mr Salmond had said he was innocent of all the charges against him throughout the two-week trial.
The women who made the allegations against Mr Salmond included an SNP politician, a party worker and several current and former Scottish government civil servants and officials.
During his evidence to the court, he said the claims made about his alleged conduct were "deliberate fabrications for a political purpose" or "exaggerations".
And he said he had "never attempted to have non-consensual sexual relations with anyone in my entire life".
Mr Salmond's defence team had claimed during the trial that a senior Scottish government official known as Woman A, who was one of his accusers, had contacted some of the other complainers before Mr Salmond was charged.
Defence lawyer Gordon Jackson QC told the jury: "That stinks. It absolutely stinks".
Mr Jackson also said his client had not always behaved well and could have been "a better man on occasions" - but had never sexually assaulted anyone.
Speaking outside court after his acquittal, Mr Salmond said: "As many of you will know, there is certain evidence I would have liked to have seen led in this trial but for a variety of reasons we were not able to do so.
"At some point, that information, that facts and that evidence will see the light of day."
He also said his faith in the Scottish legal system had been "much reinforced", and thanked his legal team and everyone else who had supported him.
Mr Salmond added: "Whatever nightmare I have been through over the last two years it is as nothing compared to the situation we are all going through.
"If you can, go home, take care of your families, God help us all."
After a political career crossing four decades, Alex Salmond has spent more time than most sitting nervously waiting for a result to come in. Never, though, one quite like this.
As the foreman of the jury read out verdicts clearing the former first minister of sexual assault, it was like the air had gone out of the room. After six total hours of pacing and speculation, the inhabitants of court three were utterly silenced.
For two weeks, Mr Salmond had sat placidly in the dock as his future and freedom were debated in front of him. Giving evidence, there was little evidence of the political showman of old - this was a reserved Alex Salmond, acutely aware of the difficulty of the situation facing him.
Outside the court too, there was little in the way of triumphalism. He thanked the jury and his supporters, and voiced fears about the coronavirus crisis.
But he also spoke about how "certain evidence" was yet to come to light.
This underlines that while the court case is over, there are many matters which are far from settled.
There will now be myriad questions directed at the Scottish government, the SNP, and Nicola Sturgeon.
But these will be debated in the political arena, not the legal one.
Nicola Sturgeon, who replaced Mr Salmond as first minister and SNP leader in 2014, told BBC Scotland that the jury's verdict must be respected and that she will welcome the parliamentary inquiries that are to be held into her government's handling of the allegations against Mr Salmond.
She added: "I am a strong believer in a rigorous, robust independent judicial process where complaints of this nature, if they come forward, are properly and thoroughly investigated, due process takes its course and a court reaches a decision.
"I have no doubt that there will be further discussion around this issue in due course, and I will welcome that, but that time is not now.
"This country faces a crisis right now that is bigger than anything we've ever faced before, and as first minister my duty to the public is to focus 100% on steering us through that crisis - and that is what I intend to do."
The Scottish government admitted during a judicial review in January of last year that it had acted unlawfully while investigating sexual harassment complaints made against Mr Salmond by appointing an investigating officer who had "prior involvement" in the case.
Mr Salmond, who hosts a TV show on controversial Russian broadcaster RT, was arrested by the police and formally charged later the same month.
He resigned from the SNP in August 2018, but made clear at the time that he intended to apply to rejoin the party that he led for a total of 20 years once he had cleared his name.
Mr Salmond remains an iconic figure for many within the party and the wider independence movement, and raised more than £100,000 in just three days from an online crowdfunder to pay for his judicial review against the Scottish government.
The jury's verdict was welcomed by SNP MP Joanna Cherry QC, who said that there were now "serious questions about the background to these cases".
Ms Cherry added: "Some of the evidence that has come to light both in the judicial review and at this trial raise very serious questions over the process that was employed within the Scottish government to investigate the alleged complaints against Mr Salmond.
"I am sorry to say some of the evidence also raises serious question marks over how these complaints were handled by the SNP."
Delighted for Alex Salmond.— Kenny MacAskill (@KennyMacAskill) March 23, 2020
Some resignations now required
Another SNP MP, Kenny MacAskill, tweeted that he was "delighted" for Mr Salmond, before adding: "Some resignations now required."
Scottish Conservative leader Jackson Carlaw said: "This remains a national political scandal with profound questions of integrity for the first minister and her SNP government."
But he said everyone's efforts must be focused, for now, on tackling the coronavirus crisis.
What did the jury decide?
The jury returned not guilty verdicts on 12 of the sexual assault charges, including one of attempted rape, and returned a not proven verdict on a charge of sexual assault with intent to rape.
The not proven verdict is an unusual and highly controversial feature of the Scottish legal system which in practice is exactly the same as a verdict of not guilty.
The charges were all alleged to have happened while Mr Salmond was serving as Scotland's first minister, with several alleged to have happened at the first minister's official Bute House residence in Edinburgh.
Mr Salmond was first minister between May 2007 and November 2014, when he stood down in the wake of the Scottish independence referendum and was replaced by Nicola Sturgeon.
What did the trial hear?
- Woman tells court Alex Salmond 'pounced' on her
- Alex Salmond trial witness denies making up allegations
- Woman claims former first minister gave her 'very sloppy' kisses
- Woman says former first minister 'apologised' for behaviour
- Woman says Salmond kissed her after 'zombie walk'
- Rotas 'changed' after women made complaints
- Salmond says sex assault claims are 'deliberate fabrications'
- Witness says Salmond accuser did not attend dinner
- Prosecutor claims Salmond was a 'sexual predator'