TMZ/Getty
Exclusive

Danny Masterson I Need More Time in Rape Case ... Leah Remini's Meddling!!!

Danny Masterson claims Leah Remini's well-known anti-Scientology campaign is a driving force behind the accusations in his rape case, and now he's asking for more time to prepare a defense.

According to new legal docs, obtained by TMZ, the "That '70s Show" star claims Remini -- who famously left the Church of Scientology -- has been influencing the prosecution and LAPD detectives to work against him ever since he called her out for "religious bigotry" in 2016.

Masterson claims Remini began urging 3 women -- all Jane Does -- to make reports to the LAPD accusing him of sexual assault. He says Jane Doe 1 had made baseless allegations against him 12 years prior, but Jane Does 2 and 3 -- women he claims to have been romantically involved with years ago -- didn't come out with their allegations until after his spat with Remini.

According to the docs ... Masterson says Remini guided the Jane Does as they spoke with prosecutors and even engaged in "correcting" their statements by piping in during the interviews.

He also accuses the prosecution of being "starstruck" by Remini due to her high-profile crusade against Scientology and her TV career, and claims she's chummy with LAPD detectives ... even using them as her personal security.

All in all ... Masterson's alleging there is an anti-Scientology bias against him in the investigation, so he's asking the court for more time to combat it, gather more info, and prepare his defense.

As we've reported ... the actor has been charged with raping 3 women between 2001 and late 2003.

Click here for info about our online advertising practices.