A court was placed into lockdown after a lawyer said he was suffering from Covid-19 minutes after he left the building.
Defence solicitor Graeme Cunningham, a former police officer, was representing several clients at Kilmarnock Sheriff Court on Thursday.
And within an hour of leaving the Ayrshire courthouse he contacted staff to say he had received the results of his Covid test - and that he was positive.
Court employees, other lawyers and the sheriff who had been in the courtroom were said to be anxious about continuing with the remaining cases when told.
A deep clean of the courtroom had to be carried out while the remaining cases were transferred to another part of the building.

It's understood Cunningham, 57, had returned from a 10-day holiday in Portugal just days earlier.
Court sources said staff have raised concerns about when the test result had actually been received by Mr Cunningham - and when he knew he was infected with the deadly virus.
A source said: "Mr Cunningham has, since Covid began, complained relentlessly about the measures being taken within the court building and courtrooms and the conduct of court staff and others.
"It's ironic there are now questions about his behaviour and how he's put others at risk."
A spokesperson for the Scottish Courts and Tribunals Service said: "We stress to everyone who may attend our court buildings who have, or are displaying symptoms of Covid-19 not to enter our buildings.
"Following confirmation that someone who was present at Kilmarnock Sheriff Court has tested positive for Covid, our normal protocol was swiftly implemented to maintain a safe environment and protect others within the building.
"Business was transferred and completed in another courtroom and no business had to be cancelled or continued administratively as a result of this notification."
Mr Cunningham said: "For the avoidance of doubt the covid test in question was a day two return from abroad test.
"That test is compulsory by law. You are not required to self-isolate while awaiting the result.
"It was not a test where I had been tested due to displaying symptoms nor as a close contact to someone who had tested positive.
"As soon as I received the email from Randox health advising of the positive result, after I had left court, I advised the court of the result in order that those who may have had close contact with me could take any action that they felt appropriate.
"I understand the action taken by the court was taken at the behest of the presiding sheriff."
Don't miss the latest news from around Scotland and beyond - Sign up to our daily newsletter here.