LOUISVILLE, Ky., (WDRB) – A Louisville judge told a local attorney she was holding him in contempt on Jan. 19 and had deputies take him into custody – then said in court she was joking.

Jefferson District Court Judge Jennifer Leibson told attorney Scott Barton he had added 37 cases to her docket after the court had forbidden adding anymore cases that day, telling him she found his conduct “contemptuous.”

“For professional courtesy, I’m not going to have them cuff you, but I’m going to ask you to step in the back with the sheriffs,” Leibson sternly told Barton.

Barton asked the judge if he could offer a defense, according to a video of the hearing.

“I wouldn’t,” she said. “I’m going to ask that you step in the back with the sheriffs.”

Barton again tried to defend himself and Leibson again told him to go with deputies to a holdover area where inmates are held when they are brought to court.

“If you want to call an attorney to represent you, then you certainly can,” Leibson said as Barton was led away.

After Barton was gone, Leibson broke into a smile and whispered that it was a joke.

“We’re just kidding but he doesn’t know it,” she said as defendants and attorneys laughed. “Oh he is so mad. Did you see his face?”

After an investigation of the incident, the sheriff's department said at least some of the deputies involved also didn't know it was a prank. 

"If it was a joke, it was between the judge and the attorney," Lt. Col. Carl Yates, spokesman for the sheriff's office, told WDRB Friday.

After taking Barton into custody, a deputy told Leibson that Barton was “hot ... he was mad” when he was taken in custody.

Reached by phone last month, Barton told WDRB it was a “non-issue” and wouldn't comment further. 

Yates said Barton was only kept in custody for a few minutes before the judge sent back word that the attorney was not actually being found in contempt. 

Yates said a deputy in the court alerted department officials to the incident, because it was unusual. 

While Yates cautioned that "practical jokes sometimes backfire" and the courtroom is a "business environment," he said the fake arrest of Barton did not delay the hearing of other cases or cause any other harm. 

"Everything turned out fine," he said. 

Leibson did not return a phone message seeking comment last month. 

Copyright 2017 WDRB Media. All rights reserved.