Former Labour MSP Mike Watson has been sentenced to 16 months in prison for starting a fire which endangered lives at an Edinburgh hotel last November.
The sheriff said there was a risk that Watson would re-offend
Earlier this month, Lord Watson had admitted wilful fire-raising.
Passing sentence, Sheriff Kathrine Mackie said a social enquiry assessment had concluded there was a significant risk of Watson re-offending.
However, the sheriff reduced his sentence from 20 months to 16 because of his pre-trial guilty plea.
Lord Watson, 56, admitted setting fire to a curtain after a heavy drinking session at the Scottish Politician of the Year awards ceremony at the Prestonfield House Hotel last November.
The blaze caused £4,500 worth of damage.
After being sentenced, Watson was taken to Saughton Prison in Edinburgh. He will be transferred to a prison near his home in the next week.
He had initially denied he was responsible, despite CCTV footage showing him crouching down at the base of a curtain just minutes before it was engulfed in flames.
After pleading guilty at Edinburgh Sheriff Court at the beginning of September, he stepped down as an MSP, triggering a by-election in his former Glasgow Cathcart constituency, and resigned as a director of Dundee United football club.
Sheriff Mackie said: "Fire-raising is a most serious crime.
"By pleading guilty to this charge you have acknowledged that you intended to set on fire property at Prestonfield House Hotel whereby property was damaged and lives were endangered.
"The potential for serious injury to guests and staff within the hotel, and for very significant damage to the property, was considerable."
The sheriff said that it was due to the prompt action of staff that there was neither injury nor more significant damage.
She said there had been no explanation for his actions.
Outside the court, Watson's spokesman said: "He just wants to say that his wife Clare has stood by him like a rock during a phenomenally difficult time and she continues to stand by him.
"He would also like to thank what he would term his true friends, who have really stood by him during this time.
The peer set fire to curtains at the Prestonfield House Hotel
"I think when you are close to someone like his wife is, you hope for the best but prepare for the worst. Probably the worst fears were realised today."
The sentence was announced from the platform at the Scottish National Party annual conference in Aviemore following a debate about the House of Lords, and was met with a large cheer from delegates.
In a statement, a Labour spokesman said: "Mr Watson has been expelled from the Labour Party.
"His sentence illustrates that if you commit a serious crime in Scotland, no matter who you are, you must face the consequences. That is right."
Scottish Conservative home affairs spokeswoman and deputy leader Annabel Goldie said: "The sentence actually served will not be 16 months.
"Thanks to Labour and Lib Dem insistence of preserving automatic early release, Lord Watson will be out of jail after serving only half his sentence, eight months."