Former News of the World editor Andy Coulson has been cleared of committing perjury while giving evidence in the trial of ex-MSP Tommy Sheridan.
Coulson, 47, was on trial for about two weeks at the High Court of Edinburgh accused of lying under oath when he appeared as a witness during Mr Sheridan's 2010 perjury trial in Glasgow - an allegation he denied.
But the case against him collapsed after a judge upheld a defence submission that he had no case to answer.
Trial judge Lord Burns ruled the Crown had not shown Coulson's allegedly false evidence was relevant in the Sheridan trial.
Speaking outside court following his acquittal, Coulson - a former director of communications for the Prime Minister - said: "I am obviously delighted by the judge's decision today. It was the right decision.
"This prosecution was always wrong. I didn't lie and the prosecution, in my view, was a gross waste of public money.
"I am just delighted that after four pretty testing years that my family and myself have finally had a good day.''
Coulson was found guilty in June last year of conspiring to intercept voicemails at the now-defunct Sunday tabloid following a trial at the Old Bailey.
The prosecution case in the perjury trial centred around what they alleged to be lies told by Coulson at Mr Sheridan's trial more than four years ago about his knowledge of phone hacking.
Mr Sheridan was accused of perjury at that stage and, while conducting his own defence, called Mr Coulson as a witness over two days at the High Court in Glasgow in December 2010.
Mr Sheridan's trial was in respect of evidence he gave in an earlier 2006 civil action, a successful defamation case in Scotland's Court of Session against the newspaper's publishers, News Group International.
He went on trial for perjury in 2010 and was jailed for three years after being found guilty of lying about the tabloid's claims that he was an adulterer who visited a swingers' club.
Prosecutors in the new perjury trial alleged that Coulson made false claims on December 9 and 10 2010 after being sworn in as a witness.
The charge against Coulson alleged he falsely stated that before the arrest of private investigator Glenn Mulcaire and News of the World journalist Clive Goodman on August 8 2006, he did not know that Goodman was involved in phone hacking with Mr Mulcaire.
He pleaded not guilty to the allegations against him.
The Crown led evidence from several former journalists at the paper as they tried to build a picture of practices while Coulson was editor - a position he held from January 2003 until his resignation in January 2007.
But when the prosecution closed its case after seven days of evidence last Tuesday, Coulson's legal team lodged a submission that there was no case to answer.
The judge upheld the motion after two days of argument and acquitted Coulson on Monday.
But the acquittal was suspended and could not be reported until today while the Crown decided whether it would appeal.
No appeal was made and Lord Burns informed Coulson today that the suspension was removed and told him he could leave the dock.
Coulson walked to the back of the courtroom and sat down to listen to the judge discharge the jury.
Lord Burns told jurors that perjury was the giving of false evidence under oath which is relevant to the issues in that trial.
He said the Crown needed to prove that the allegedly false evidence given by Coulson was relevant to the issues in Mr Sheridan's trial, and told the jury it was a question for him to decide, not the jury.
Lord Burns told jurors: "I decided that the Crown had not led sufficient evidence to satisfy me that the allegedly false evidence was relevant to proof of the charge in Mr Sheridan's trial or Mr Coulson's credibility at that trial."
Following today's hearing, a Crown Office spokesman said: ''Andrew Coulson was a defence witness at the trial of Tommy Sheridan. He gave his evidence without objection as to relevancy.
''The Crown indicted Coulson on the basis that he lied during parts of his evidence, in particular that he had no knowledge of phone hacking.
''The trial judge in the Coulson trial, at the conclusion of the prosecution evidence, ruled that this evidence was irrelevant and therefore could not found the basis for a prosecution for perjury.
''This brings proceedings to an end."