Paul Thomas Anderson’s film “The Master” — said to be based on the Church of Scientology — nearly swept the Venice Film Festival over the weekend and generated big buzz in Toronto. But behind-the-scenes sources say the church has been ratcheting up its opposition to the movie — prompting distributor Harvey Weinstein to beef up his own security.

Even though Anderson and star Philip Seymour Hoffman insist in interviews their film isn’t about the controversial religion, sources say Scientologists have been “inundating” the distributor, The Weinstein Co., with strange calls objecting to the film and are concocting plans to combat it when the film is released this week. “The Master” stars Hoffman as an enigmatic church leader and Joaquin Phoenix as an early disciple.

Sources tell Page Six that Scientology is countering the film’s marketing by running its own ads promoting its message in places where ads and stories about “The Master” appear.

Calls and mail from people believed to be Scientologists to Weinstein’s office have grown numerous enough that some on the film’s team have hired extra security, a source said. Weinstein had already been under close guard following a recent attempt to blackmail him by a man unrelated to the film.

Saturday, “The Master” swept the Venice Film Festival, winning Anderson a top directing prize as well as acting awards for Hoffman and Phoenix. It was also chosen by the Venice jury as best picture, but that honor was taken away due to a rule technicality.

Simultaneously at the Toronto Film Festival, “The Master” screened to big awards buzz and critical praise and Weinstein seemed relaxed and mingled without obvious security. The Weinstein Co. quickly put together a New York premiere tomorrow to benefit Martin Scorsese’s Film Fund at the Ziegfeld Theatre. Guests expected include the film’s Amy Adams and Anderson, Jessica Chastain and Trudie .