Bam Margera is taking Paramount, his former pal Johnny Knoxville and "Jackass Forever" film directors Spike Jonez and Jeffrey Tremaine to court over his firing from the off-the-wall franchise.

The skateboarder and reality star, 41, who is an original cast member of the popular TV and film series, was fired from the latest installment last fall after he allegedly returned a positive test for Adderall – which violated the terms of a "wellness agreement" he signed with producers, according to court documents obtained by Fox News.

Margera claimed in the filing on Monday that Jonez and Knoxville coerced him into signing the "wellness agreement." 

He also claims in his complaint that the forthcoming film, which is due out in October, also uses many of his efforts. Margera also pressed that he has fallen "victim" to mistreatment as a result of his mental health, à la Britney Spears, according to the filing.

'JACKASS' DIRECTOR GRANTED RESTRAINING ORDER AGAINST BAM MARGERA FOLLOWING ALLEGED THREATS

‘Jackass’ director Jeff Tremaine got a restraining order against Bam Margera after he made threats to him and Johnny Knoxville. 

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

"While Margera has given Jackass—quite literally—more than two decades worth of his blood, sweat and tears, Defendants have not repaid him in kind," the filing reads. "Rather, Margera, who has a documented history of physical and mental health issues, including diagnosed bipolar disorder, has been the victim of unconscionable discrimination at the hands of Defendants."

Elsewhere, the suit adds, referencing Spears: "Unfortunately, traumatic as Margera’s experience may have been, it is not uncommon. Only recently have brave individuals felt empowered enough to come forward with their stories."

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

Margera has had multiple stints in rehab but according to the stunt performer and TV personality, he hadn’t even had a chance to have an attorney look over the agreement, which allegedly contained language requiring regular drug and alcohol tests, as well as a prescription medication regimen, before he signed it.

In 2018, Margera was arrested for a DUI and headed to rehab. He appeared on "Dr. Phil" in 2019 and checked back into rehab soon after.

Bam Margera is suing Johnny Knoxville and Paramount after he claims he was fired from the film, ‘Jackass Forever’ for testing positive for Adderall – a substance he says he has been prescribed for over 10 years. (Photo by Jamie McCarthy/Getty Images)

Bam Margera is suing Johnny Knoxville and Paramount after he claims he was fired from the film, ‘Jackass Forever’ for testing positive for Adderall – a substance he says he has been prescribed for over 10 years. (Photo by Jamie McCarthy/Getty Images)

Knoxville also spoke on the situation in an interview with GQ in May.

"I don’t want to get into public back-and-forth with Bam," Knoxville said at the time. "I just want him to get better."

BAM MARGERA CHECKS INTO REHAB AFTER TRESPASSING ARREST

Furthermore, the lawsuit claims the named parties fired Margera after he tested positive for the prescribed substance despite his position that he had been taking Adderall by prescription for 10 years.

"Paramount’s inhumane treatment of Margera cannot be countenanced," the suit states. "Margera was made to endure psychological torture in the form of a sham Wellness Agreement, and then ultimately terminated for his protected class status due to his medical condition, and his complaints about Defendants’ discriminatory conduct towards him."

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

In a press release announcing the filing of the lawsuit, Margera said, "I am pissed-off, angry, hurt and shattered that Johnny [Knoxville], Jeff [Tremaine], Spike [Jonze] and the studios and producers ripped off my creativity, content, and stunts to make this movie, fired me without justification, and refuse to pay for my work; I created this franchise before any of these guys ever got involved."

He continued, "My lawsuit isn’t just about compensation. It’s about treating people with mental health and addiction issues in an honest manner and not taking advantage of their disabilities to rip them off."

CLICK HERE TO GET THE FOX NEWS APP

Reps for Paramount, Knoxville and Jonez did not immediately respond to Fox News’ request for comment.