Former "Jackass" star Bam Margera took a deal and pleaded guilty to disorderly conduct on Wednesday, after previously being charged with assaulting his brother and making threats to other family members last year at his home in Pennsylvania.

As part of the plea, Margera will serve six months of probation. 

Fox29 Philadelphia reports that the embattled stunt performer will be subjected to random drug testing and that the judge warned the 44-year-old to stay clean or he'd be locked up.

BAM MARGERA MANHUNT OVER, 'JACKASS' STAR TURNS HIMSELF IN

Bam Margera in a grey blue shirt holds an ax behind his back

Bam Margera pleaded guilty to disorderly conduct in court on Thursday. He was sentenced to six months' probation. (Jason Kempin/FilmMagic/Getty Images)

In April 2023, authorities were called to Margera's Pocopson Township residence in Chester County for a reported "domestic in progress."

Margera had allegedly punched his brother Jesse in the face before fleeing the scene. In a complaint obtained by Fox News Digital, Jesse claimed Bam woke him up by allegedly "banging and kicking his locked bedroom door."

Upon leaving his room, Jesse said he found a handwritten note from Bam that allegedly read, "If you even f---ing think of calling the police on me I will officially f--- you up." Jesse found Bam in the kitchen, where he was reportedly "urinating in the sink." Becoming "aggressive," Bam allegedly started "punching him, striking him in the right eye/nose and left ear," and also grabbing his arm.

Bam Margera in a bright blue t-shirt and black brimmed hat smirks next to his father (left) Phil in a bear hat and grey shirt and mother April smiling with a scarf

Phil Margera, pictured left with son Bam and wife April, was listed as a victim in documents obtained by Fox News Digital in April 2023. (Gilbert Carrasquillo/Getty Images)

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

The documents indicated that Margera's father, Phil, was also a victim in the incident. 

A manhunt ensued for Margera and he turned himself in days later.

At a court hearing following his surrender, Jesse told the court that his brother is "a good dude when he’s not messed up," but said he had exhibited troubling behavior for two decades and, while home, had been awake for days. Jesse suffered a ruptured eardrum in the altercation, while Margera’s girlfriend called police when he kicked in her bedroom door, the brother testified.

Bam Margera in a black suit and blue shirt leaving court

Bam Margera was seen leaving the Chester County Justice Center on Thursday. (Gilbert Carrasquillo/GC Images/Getty Images)

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Phil, along with Margera's mother, April, supported their son on Thursday. "We all love him and just want him to do great," his mother said per Fox29. "He’s been through a lot in his life. He’s had a lot of access, and he’s had a lot power, and it’s hard to come down from that."

Margera's defense attorney, William J. Brennan, said his client pleaded guilty to two summary offenses, and is now clean, sober and productive a year after the arrest. "You can really say he won his case before today just by turning his life around," Brennan told the press.

Bam Margera smiles outside court with his attorneys and fiancé Dannnii Marie

Bam Margera, smiles at the Chester County Justice Center, surrounded by his lawyers and wife Dannii Marie. (Gilbert Carrasquillo/GC Images/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Margera also spoke with the media following court, admitting the arrest had only benefited him. "I would go on drinking benders and it was not good. I would end up in some crazy situations. It actually took that knowing that if I p--- hot, I’m going to jail and I don’t want that," he said, per Fox29. "It really helped and now that I've done this amount of time, I don't want to go back to that lifestyle."

The Associated Press contributed to this report.