Mel Gibson believes he and his mega-church were targeted by a scheming construction company -- in a diabolical plot to bilk them out of millions of dollars ... this according to legal docs obtained by TMZ.
It's the latest in Gibson's nasty legal war with Ramage Construction Company ... which Mel had hired in 2000 on behalf of the foundation that owns his church in Malibu. Ramage had first sued Gibson earlier this year for failing to pay for a portion of the work they did.
But according to the new docs, filed in L.A. County Superior Court -- Mel claims Ramage had a secret plan to scam the foundation by billing them for "hundreds of thousands -- if not millions -- of dollars of work at [the church] that was unnecessary or excessive."
In the docs, Mel claims Ramage screwed up elevators, sprinkler mains, electrical wiring and botched a generator installation ... among numerous other problems and deficiencies.
Gibson also accuses Ramage of trying to use the media against him -- stating that the company went public with the original lawsuit "in an attempt to intimidate and embarrass Mr. Gibson and his foundation into paying them even more unwarranted sums."