A cannabis farmer endangered the lives of flat residents when he sparked a blaze in a block of flats.
A court heard how residents had to flee for their lives when Derek Singer's attempt to bypass the electricity flow caused a fire which spread across two blocks of flats.
The taxi controller, who caused nearly £10,000 worth of damage to the housing association flats, was jailed for a year on Monday. He was also ordered to pay £8837 compensation.
Singer had been trying to produce his own cannabis crop in the loft space of flats in Newhouse Road, Perth.
The 46-year-old tampered with the power supply to the roof space but the system overheated and caught fire as a result and nearly a dozen homes had to be evacuated.
Perth Sheriff Court heard how the charred remains of seven cannabis plants were found in the attic of Singer's flat when firefighters eventually brought the blaze under control.
The court was told that Singer wanted to "grow his own" cannabis supply and paid an amateur electrician £100 to set up the farm in his attic space.
Singer, of Newhouse Road and now of Gillespie Court, Perth, admitted endangering the occupants of flats at blocks 13 and 15 Newhouse Road on October 3 last year.
He admitted culpably and recklessly tampering with the electricity supply by installing a device to bypass the flow of electricity to the roof space at Newhouse Road. He admitted causing the supply to overheat and catch fire in the roof space, and thereafter taking hold across the flats.
Singer also admitted cultivating cannabis, but had not guilty pleas accepted to charges of stealing electricity and possessing cannabis. Reference to causing danger of electrocution to 999 staff was also deleted from the charge.
Solicitor David Holmes, defending, said: "He had been using cannabis and it had been suggested to him it would be cheaper to grow his own cannabis. It was foolhardy."
Mr Holmes said Singer paid the friend who gave him the idea to set it up but had not realised that his friend's knowledge of electricity was "somewhat limited."
He said Singer had also been caught illicitly using £1200 worth of electricity and was now repaying that amount to the power company at £20 per week.