"Jackass" director Jeff Tremaine has been granted a restraining order against Bam Margera after alleging that he threatened him and his family. 

Online court records previously viewed by Fox News show that the producer and director of the popular stunt franchise filed for a "civil harassment prevention" in Los Angeles Superior Court against Margera days after the latter shared a video bashing Tremaine and Johnny Knoxville over his firing from "Jackass 4." 

According to TMZ, Tremaine has been granted his temporary restraining order, requiring Bam to remain at least 100 yards away from Jeff, his wife and his kids. Margera is also barred from contacting the director for any reason. 

The outlet also shed some new light as to Tremaine’s reasoning for seeking legal help to keep distance between himself, his family and the former professional skater. Tremaine claims that he was being harassed by Margera since February after he was allegedly a no-show at a virtual meeting designed to find solutions for the troubled star's mental health and sobriety struggles as they continue to push forward on a fourth movie in the franchise. 

'JACKASS' STAR STEVE-O: WHY HE'S JUST AS SHOCKED AS YOU ARE THAT HE MADE IT TO HIS 40S

He claims Margera then began targeting him on social media with public rebukes, threats of violence, obscene drawings, comparing him to disgraced movie mogul and convicted rapist Harvey Weinstein as well as made a comment that he and Knoxville can "pencil in there [sic] death certificate." 

‘Jackass’ director Jeff Tremaine got a restraining order against Bam Margera after he made threats to him and Johnny Knoxville. (Franziska Krug/Getty Images)

The outlet reports that the most disturbing thing to come out of Margera's behavior was an alleged threat directed at Tremaine’s children that read: "Look at your children and grab your pocket book and write a check, if you are greedy, and cheap, look at your children again. If you don‘t sign the paper, look at you children. Sign your stupid f---ing contract before your [sic] not safe anywhere."

Tremaine claims that the "contract" Margera is referring to is one that he wrote himself. 

Neither representatives for Tremaine nor Margera immediately responded to Fox News' request for comment.

BAM MARGERA CHECKS INTO REHAB AFTER TRESPASSING ARREST

Margera, one of the original cast members who made the MTV show and three subsequent "Jackass" movies, was fired from the fourth movie and went on a rant about Tremaine and Knoxville on social media about it. 

"My ‘family’ Jackass has betrayed me, abandoned me, rejected me. Not all of them. I love all of them and they love me back. But it's specifically Jeff Tremaine and Johnny Knoxville so I feel like my family has f--king done everything horrible to me and made me jump through hoops and walk on eggshells, which is impossible, and strung me along like a f--king puppet to get the $5 million that I usually get when I get when I make a movie with them," Margera says in the two-minute clip.

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

Margera also confirmed in the video that he was in Florida seeking help from a "very special lady." He has been in and out of rehab in recent years.

Meanwhile, fellow "Jackass" star Steve-O commented on Margera's recent video in opposition of his claims.

CLICK HERE TO GET THE FOX NEWS APP

"Bam— the two people you’re saying wronged you (Knoxville and Tremaine) are the same two people who organized the intervention which saved my life. Everyone bent over backwards to get you in the movie, and all you had to do was not get loaded. You’ve continued to get loaded, it’s that simple. We all love you every bit as much as we all say we do, but nobody who really loves you can enable or encourage you to stay sick," Steve-O wrote.