"Dogma," a Catholic-baiting, wildly irreverent comedy from director Kevin Smith, is like "Priest," "The Last Temptation of Christ" and other works that have left the pious riled and sputtering. It's both sacred and profane.

A series of hilarious disclaimers set the tone of the film. Overall, it is an ultimately sanctimonious fable about a ragtag assortment of humans and celestial beings who strive to prevent a pair of fallen angels from reentering paradise via a loophole in Church dogma. Should the renegade seraphim succeed, humankind is toast.

Cut out the film's obscenity, violence and purposeful, parochial button-pushing, and what's left behind is a Catholic schoolboy's adolescent, though wholly sincere, rebellion against the rigidity of religious doctrine. But Smith, who previously directed "Clerks," is by no means in a league with the stylish, savagely unorthodox filmmaker Luis Bunuel. He's a true believer who came of age during the ascendancy of Beavis and Butt-head.

The story gets off to a flying start with the droll introduction of Loki (Matt Damon) and Bartleby (Ben Affleck), the team behind the destruction of Sodom and Gomorrah, the Flood and other apocalyptic upheavals. Weary of killing, the winged wise guys were hoping to lay down their flaming swords and, who knows, maybe get down with a lyre. But God, clearly in an Old Testament mood, exiled them to Wisconsin.

At long last, they've found the way back. All they have to do is walk under a blessed arch in a New Jersey cathedral when it is reconsecrated in the next couple of days by a cardinal (George Carlin) who has embarked on a campaign called Catholicism Wow! "Christ didn't come to Earth to give us the willies," he says. Thus, he proposes replacing the crucifix with statues of a smiling Jesus giving the thumbs-up sign, alias the Buddy Christ.

Meanwhile across town, a heavenly messenger (Alan Rickman) appears in the bedroom of Bethany (feisty Linda Fiorentino), an abortion-clinic counselor having a crisis of faith. And after proving that he is not there to molest her, he explains that only a human can save the race and that Bethany is destined to do so. Though she's not quite sure that she hasn't dreamed all this up, Bethany sets off on her bizarre mission. She is joined by a heavenly Muse who works as a stripper (Salma Hayek) and Jay and Silent Bob (Jason Mewes and Smith, playing the adolescent goofballs who have appeared in all four of Smith's films).

For a while, the film is screamingly funny, but the further it goes, the more muddled the narrative becomes. Originally three hours long, the story may well have been more coherent before Smith made an hour's worth of cuts. But despite the frantic pacing and antic performances, it begins to stall in the middle of the second act when the silliness is supplanted by preachiness, the tone becomes needlessly dark and characters who do not seem so inclined become gratuitously violent. In one scene, Smith takes a whack at Disney, which dumped "Dogma" when it became clear that the picture would enrage not only Christian fundamentalists, but many moderates, too. Loki, now armed and deadly, bursts into a board meeting, accuses the members of idolatry and subsequently murders all but one. Blood spatters the statue of a cute golden calf that adorns the conference table.

Talk about the trouble with angels. In Smith's cosmology, they're no better or worse than humans; they're just a different species who commit the sins of snobbery, jealousy and selfishness. "[Humans] are favored best, and some of them don't even believe God exists," whines Bartleby.

Actually, 95 percent of Americans polled do believe in God. And the film's nonbelievers find Her on their journey toward the climactic showdown in New Jersey. Yes, He is portrayed as a She--by pop star Alanis Morissette--and She seems a bit daft as She wanders about the churchyard. Now and then She stoops to smell a flower or execute a shaky handstand. Given everything that has come before, a girlish God shouldn't come as a surprise to anyone who has managed to stay the course.

Though lumbering and overwrought, Smith's "Dogma" sometimes succeeds thanks to his unpredictable imagination. But perhaps the main problem is that it is grounded in his mantra as professed by the Muse: "It doesn't matter what you have faith in--just that you have faith." Ooohh.

Something tells me he's not about to win any new converts.

Dogma (125 minutes, at area theaters) is rated R for strong language, sex-related dialogue, violence, crude humor and some drug content.

CAPTION: Matt Damon and Ben Affleck, banished to Wisconsin in "Dogma."