Before Ricky Gervais decided to become a lumpen Charlton Heston, before he spoofed “The Ten Commandments,” before he wedged a mean-spirited putdown of Christianity into a cute date movie, he should have considered the Golden Rule: Don’t be a giant wiener just because you can. I’m paraphrasing.

Gervais, formerly the bobbing and oozing star of the inventive original version of “The Office,” is today a movie star on tryout. His new film, “The Invention of Lying,” illustrates why Nora Ephron and Christopher Hitchens don’t write screenplays together. It begins in frilly cuteness but soon becomes a labored, blunt, loud attack on religion, especially Christianity. It’s Hollywood’s big atheist comedy.

Atheist comedy? Surely I exaggerate. Surely I’m one of those hyper-sensitive Bible lovers who thinks the secularists are coming to strip my Christmas tree down to a Midwinter Solstice Pole. You can have my ceramic Nativity scene when you pry it out of my cold, dead hands.

Actually, no. Like Gervais, I’m an atheist. And I think Gervais has one of the most brilliant minds in comedy today — “Extras,” his HBO series, was even funnier than “The Office,” and his last film, “Ghost Town,” is one of the brightest comedies of the decade.

Which is why I wish he hadn’t made “The Invention of Lying.” It’s going to flop (as “Ghost Town” did), and it’s going to damage Gervais in Hollywood. In the movie, the guy Gervais plays lives in an alternate world in which no one has ever thought of telling an untruth.

He randomly hits on the idea of telling his dying mother not to worry because she’ll have a glorious afterlife in which she’ll be reunited with everyone she ever loved. Everyone gets their own mansion in the sky. Since no one has ever lied before, everyone believes Gervais, and soon he finds himself forced to instruct the peoples of the world about what happens after they die, about how to curry favor with the “Man in the Sky” who is watching everything they do and how to secure a spot in the better place we go to after death.

The movie is an ill-tempered fraud. Instead of making the latest in a long line of “stealth movies,” as my wife calls them (the ones, like “Stepmom” and “The Family Stone,” that are trailered to look like fun family holiday treats but are actually about mother-killing outbreaks of cancer), Gervais, who presents himself as just an honest bloke telling it the way he sees it, should have insisted that the TV commercials show “The Invention of Lying” as exactly what it is: More “Life of Brian” than “Liar, Liar.” He could have called it “The Invention of God.”

But it would still be a failure artistically, because of Gervais’s smug contempt. In the “Ten Commandments” scene — I was about to call it the soon-to-be-infamous “Ten Commandments” scene but in order to become infamous, people have to know you exist — his character makes up 10 religious precepts, pastes them to Pizza Hut boxes and reads them to multitudes of dullards who will, literally, believe anything they are told. The scene is tailored to infuriate people of faith.

The nice thing about atheism is that it isn’t (or shouldn’t be) a creed. Those of us who don’t believe see ourselves as liberated. The principal mystery of Genesis, to us, is how to reconcile “The Lamb Lies Down on Broadway” with “Invisible Touch.” We don’t have to stand on street corners proselytizing, telling people they’re idiots — which is what Gervais is doing.

There are too many smart believers to dismiss them. Many scientists have faith, and many say that the more they studied science, the more convinced of a Creator they became. Books like “I Don’t Believe in Atheists,” by Chris Hedges and “The Case for God,” by Karen Armstrong, make a spirited argument, saying that atheists can be dogmatic too and that even if Bible stories aren’t true, we ignore their core principles at our peril. “Intellectuals of faith” is not an oxymoron.

But you don’t need to have written a book or gotten a PhD in astronomy for your views to count. If believers are, according to atheists, dead wrong, that doesn’t give atheists a license to treat them as the blundering dopes mindlessly absorbing the Pizza Hut Commandments in Gervais’s movie. The believers I’ve known tend to be kind and thoughtful. They don’t try to talk me into faith, but even if they did, it wouldn’t bother me. I don’t try to convince them that they’re wrong — because it would bother them. What would be the point? How much joy lies in convincing someone that he’s just walking fertilizer for the bone orchard?

Religion provides a great many people with a great many comforts. Christian Americans aren’t pushing the country toward theocracy. All they ask is a little respect. Maybe Gervais thinks believers are going to leave his movie thinking, “Gee, I guess Rick showed me what’s what! How silly I’ve been!” But they’re going to be offended, if not outraged. He’s lucky the movie is going to flop. Otherwise he might have to heed the wisdom of a popular Bumper Sticker Commandment of the 1970s: “Do Unto Others — Then Run!”