Former Scottish Socialist Party leader Tommy Sheridan was jailed for three years today for perjury.
The disgraced politician was convicted last month of lying during his successful defamation action against the News of the World in 2006.
After a three-month trial at the High Court in Glasgow, Sheridan, 46, was found guilty of lying about the newspaper's claims that he was an adulterer who visited swingers' clubs.
Sheridan's wife Gail, who has vowed to stand by her husband, was also accused of lying to the jury at the Court of Session in Edinburgh in 2006, but she was acquitted when the Crown dropped the case against her last month.
Mr Sheridan maintained his innocence throughout the trial, claiming he was the victim of a "vendetta" by the police and a "conspiracy" involving the News of the World and colleagues within the Scottish Socialist Party (SSP).
He claimed that 16 former allies were lying as part of a "political civil war" when they told the court that he had admitted at a 2004 meeting to having been to Cupid's swingers' club in Manchester.
Presenting his own defence, Sheridan called Andy Coulson, a former News of the World editor and Prime Minister David Cameron's ex-communications chief, to give evidence.
But the High Court jury ultimately convicted him of five of six allegations in a single charge of perjury against him, relating to his evidence during the civil case.
In doing so, they found him guilty of lying about an affair with SSP member Katrine Trolle in 2005 and a trip to Cupid's with her, Andrew McFarlane, Gary Clark, and News of the World journalist Anvar Khan on September 27 2002.
Judge Lord Bracadale said: "By pursuing and continuing to pursue a defamation action, you brought the walls of the temple crashing down not only on your own head but also on your family and your political friends and foes."
He praised Sheridan as a "hard-working" politician who used his "undoubted powers of oratory" to further the causes he believed in, and said his campaign against the poll tax and abolition of warrant sales would be a part of the "fabric of Scottish social and political history".
News of the World spokesman said: "This is a just outcome to a long and complex criminal case. Today's sentence also provides closure for the many witnesses who very bravely exposed their own lives to public scrutiny when they testified to Mr Sheridan's guilt.
"Mr Sheridan has been jailed for lying to a court to secure victory when he sued the News of the World for defamation in 2006. At the time he was an elected member of the Scottish Parliament.
"As we have made clear, we have an appeal lodged against that defamation verdict and we now look forward to that appeal succeeding in Scotland's Court of Session."
Judge Lord Bracadale told Sheridan: "When perjury is established it must be dealt with seriously for the benefit of the court and the public.
"You embarked on an action in the Court of Session knowing that, for it to be successful, you would be required to tell lies under affirmation.
"You committed perjury and you were awarded a very large sum in damages. The only appropriate sentence is one of imprisonment."
The judge said he had not taken Sheridan's previous convictions into account as he had judged that they were not relevant to the perjury trial, and he had also considered what Sheridan had said in mitigation
Sheridan listened to the judge's comments in silence and stared straight ahead as he was handcuffed by the dock officers.
His family and political comrades who packed the courtroom also stayed silent but raised one fist in the air as a salute.
As he was led to the cells, Sheridan turned to his family and supporters and said: "Take care, all the best."
Gail then hugged Sheridan's lawyer, Aamer Anwar and her sister, Gillian, before she too left the court.
She was expected to make a statement outside the court where Sheridan's supporters had congregated along with the waiting media.
A statement from the SSP's Frances Curran and Colin Fox said: "Today's proceedings at Glasgow High Court finally end the ill-advised action Tommy Sheridan initiated six years ago in suing a tabloid over allegations he knew to be true. The jury found him guilty and the court has now passed sentence.
"He alone is responsible for where he sleeps tonight, no-one else. He pursued legal action full in the knowledge he would lie in court. He asked his closest political allies and friends to join him in that crazy strategy and then turned on us because we refused.
"He still shows no sign of taking responsibility for his own actions.
"More widely, this affair is a stark warning of the dangers of allowing personal celebrity to displace political principles."
Meanwhile, outside court, a crowd of supporters from Sheridan's Solidarity party held up "Wanted"-style banners condemning Mr Fox and fellow SSP member Carolyn Leckie for "crimes against socialism" for giving evidence against Sheridan.
A statement issued by the party said the three-year sentence was "barbaric and draconian".
"Solidarity will continue to give our full backing and support and backing to Tommy, and in particular to Gail Sheridan and the family at this difficult time.
"Neither Tommy Sheridan nor Solidarity will be broken. We stand, as always, in solidarity."
Outside the court, Mrs Sheridan said: "As for Tommy, well, Tommy has dedicated his life to helping others.
"The real reason why he's been imprisoned today is because he has fought injustice and inequality with every beat of his heart.
"But it won't be long before Tommy is back stronger and continuing the fight."
Sheridan announced his intention to both appeal against his conviction and launch a legal action in relation to the phone hacking controversy.
He said in a statement read outside court by his solicitor, Aamer Anwar: "This multimillion-pound prosecution will separate me from my wife and child and that will be heartbreaking.
"But I will continue to fight a system that protects the real criminals - the rich and powerful."
The statement went on: "I have today instructed my solicitor to lodge an appeal against conviction.
"But also to launch legal action against the News of the World, the Metropolitan Police and Glenn Mulcaire over phone hacking.
"In addition my solicitors will begin to contact a dossier of Scottish names handed to them of those whose phones may have been hacked.
"Andy Coulson may have resigned for the second time but if he and others are not above the law then it is time that they faced justice.
"That chapter is yet to be written."
There were cheers and applause from dozens of supporters gathered outside the court as the statement was read.