Updated at 9:25 a.m. Friday: Revised to reflect the attorney’s release from jail.

The defense attorney for the man accused of beating Muhlaysia Booker has been released from jail after he was held in criminal contempt Thursday after what the judge called “continued outbursts” in the courtroom.

Andrew Wilkerson is representing Edward Thomas, who is charged with aggravated assault with a deadly weapon in connection with the April 12 attack at a Dallas apartment complex, which was captured on viral video.

State District Judge Hector Garza gave Wilkerson 14 days in jail and a $500 fine after finding him in contempt.

“So I’m not going to be able to represent my client for the rest of the trial?” Wilkerson asked before he was led out of the courtroom by bailiffs.

Michael Campbell, another defense attorney in the case, stepped in as lead defense counsel. The judge ruled that neither side could bring up the contempt proceedings in front of the jury.

Wilkerson was booked into the Dallas County jail at 2:46 p.m. He was released about 2:11 a.m. Friday.

The sheriff’s office said Wilkerson was granted a personal recognizance bond of $500 for the contempt charge in lieu of accepting the punishment assessed by the court in contempt proceedings. He was seen in the courtroom before Friday’s proceedings began.

The defense has argued that Booker, a 22-year-old transgender woman, brought the beating on herself. Prosecutors say no amount of provocation justifies a brutal assault, which left Booker with a fractured wrist and a concussion.

Edward Thomas (Dallas County Jail)

Booker was shot to death about a month after the beating at the Royal Crest Apartments. Another man, Kendrell Lavar Lyles, is charged with murder in her death, which was unrelated to the assault.

During the second day of testimony in Thomas’ trial, Garza twice sent the jury out of the room as Wilkerson cross-examined Dallas police Detective Chris Evans, who investigated the assault case.

The second time came after Wilkerson repeatedly asked Evans if he knew the name of the apartment complex where the beating happened. Evans said he did not recall it — he cited the street name instead: Wilhurt Avenue in east Oak Cliff.

The attorney then repeatedly asked Evans whether it’s important to know where an offense took place before moving on to ask if the apartment complex was in a high-crime area.

The prosecution objected, saying that was irrelevant, and Wilkerson interjected: “I don’t know why it’s not relevant that there’s other people that can be guilty” for what he said the prosecution is trying to give Thomas 20 years in prison for, referencing a plea agreement offer.

“Stop talking at this point, Mr. Wilkerson,” Garza said.

“You can’t tell me to stop talking in front of the jury,” Wilkerson fired back. “My job is to zealously, righteously and fearlessly represent my client.”

“Stop talking,” Garza said again before he called a recess, sending the jury out of the room.

Defense attorney Andrew W. Wilkerson (right) objects as Stephanie Houston testifies during the assault trial of Edward Thomas at the Frank Crowley Courts Building on Wednesday. (Smiley Pool / Staff photographer)

Wilkerson cursed under his breath as he turned around, before he left the room.

When he and the other attorneys returned, Garza announced that he was holding Wilkerson in contempt for “continued outbursts” in the courtroom.

“Put a black man in jail, huh? That’s the only way to shut him up,” Wilkerson said. “As long as I’m here I’ll be continuing to represent him zealously, your honor.”

Prosecutor Jason Hermus told the judge that the defense has repeatedly said Booker and state’s witnesses — and the prosecution itself — were lying. He said instances of the defense’s misconduct have been “replete throughout this trial.”

Judge Hector Garza held defense attorney Andrew Wilkerson (left) in contempt in his Dallas courtroom Thursday. (Smiley Pool / Staff Photographer)

After the contempt ruling, two bailiffs took Wilkerson out of the room through the door that leads to holding cells. Later, while the jury was still gone, he walked through the courtroom in handcuffs.

Little of Thursday’s proceedings focused on the videotaped beating. Instead, Thomas’ attorneys spent much of the day cross-examining Evans, asking about the fender-bender that preceded the attack.

Evans testified that Booker had hit someone’s car while she was driving at the Royal Crest Apartments and that she tried to leave without exchanging information.

The prosecution showed jurors Booker’s medical records from the beating, which detailed her injures: She had a concussion and had briefly lost consciousness, and she had bruising and scratches on her body including her face, neck and elbows.

Prosecutor Robert Withers had read Booker’s name and birthdate from the records, and he had moved on to reading her time of release when Campbell interjected.

“Read the sex!” Campbell said, referring to the records. “What does the sex say?”

The defense has repeatedly referred to Booker, a transgender woman, as a man. They refuse to call her Muhlaysia and instead refer to her only by her birth name and use male pronouns for her.

The prosecution had asked to introduce evidence that Thomas had prior assault convictions. Campbell called that “highly prejudicial” information, and the judge denied the request.

The state rested its case Thursday afternoon just before the judge dismissed the jury for the day. He told them not to watch or read news coverage of the trial or discuss it with anyone else.

With the jury gone, Campbell made a plea to the judge to release Wilkerson from jail. They spoke in hushed tones, and the judge declined to answer questions afterwards.

The trial will resume Friday morning.

CORRECTION, 1 p.m., Oct. 19, 2019: A previous version of this story said Muhlaysia Booker was 23 when she died. She was 22.