TMZ Composite
Exclusive

'Jackass' Director Bam Ordered to Stay Away for 3 Years

Bam Margera won't be anywhere near a 'Jackass' film set anytime soon, because he now has to stay away from its director, Jeff Tremaine, for a very long time.

Jeff, who claims Bam has recently threatened his life, was granted a restraining order Tuesday ... and it requires Bam to keep at least 100 yards away from Jeff for the next 3 years.

He's not allowed to contact Jeff in any way -- ditto for the director's wife and kids.

TMZ broke the story ... Jeff sought protection from his onetime pal after Bam recently went on a fuming rant against Tremaine and Johnny Knoxville.

JT claimed Bam was sending him increasingly disturbing messages, threatened his children and made a comment that Tremaine and Knoxville can "pencil in there [sic] death certificate."

@bam__margera / Instagram

The director said he feared for his family's and his own personal safety, so he filed for the restraining order ... and clearly presented enough evidence for the judge to sign off.

Bam's already been kicked off "Jackass 4," and the restraining order likely means a reunion is not in the works.

Click here for info about our online advertising practices.