A serial thief sparked a Covid-19 alert at Perth Prison when he spat at two wardens.
The officers were showered with phlegm when they went to the assistance of Andrew Pattie, Perth Sheriff Court heard.
Days later the prisoner began showing symptoms of the coronavirus.
Although Pattie, 29, later tested negative, the incident caused “significant worry and anxiety” for his victims.
Pattie was due to be released from jail next month but was locked up for another year after admitting assault charges.
Sheriff Linda Smith told him: “Given the nature of this offence, and particularly because it happened near the beginning of the pandemic, custody is not only appropriate but is the only option to reflect the seriousness of this incident”
Drug dealer Pattie was jailed for three-and-a-half years in 2018, after breaking into sheds in Dundee and making off with inflatable hot tubs and Beatles memorabilia.
Fiscal depute Alistair McDermid confirmed Pattie was a serving prisoner at the time of the attacks in June, 2020.
He had been moved from A-Hall to B-Hall and then treated by NHS staff due to concerns for his mental health.
He was then left in the cell under constant observation.
The court heard prison officers Taylor and Hamilton went to speak to Pattie and tried to encourage him to settle down.
“The accused approached the hatch and spat in the direction of officer Taylor,” said Mr McDermid.
“The spittle landed on his face and head.
“The accused then spat at Mr Hamilton, who was wearing a helmet with a protective visor.
“In the following days, the accused began showing Covid-like symptoms and had to be tested.
“The test was negative but this caused significant worry and anxiety to the officers involved.”
Solicitor David Duncan said his client was feeling “extremely helpless” at the time, and didn’t believe he was getting the support he needed.
“He effectively had a number of armed prison officers in PPE and riot gear come into his cell and try to restrain him,” he said.
In 2017, Pattie was caught dealing heroin from the flat he shared with his partner in Dundee’s Hilltown Court after she overdosed and died.
Police who turned up to investigate the sudden death found more than £30,000 of drugs at the property.
After being bailed in relation to the drugs charges Pattie carried out nine thefts in the space of three weeks across Dundee.
He stole three hot tubs from separate properties, as well as items including an Elvis magazine, Beatles memorabilia and a coin collection.
Spotted carting his haul around the city in a wheelie bin he told a passer-by: “I’m on the tan.”