Jim Carrey’s career is on the rebound after the commercial and critical failure of his last movie, “The Majestic.” While “Bruce Almighty” might not exactly answer his prayers (the bad puns are just too irresistible) it is the most solidly comedic work he’s done since 1997’s “Liar Liar.”

Like “Liar Liar,” in which Carrey played a slick lawyer who suddenly couldn’t lie, “Bruce Almighty” relies on a one-gimmick plot as an excuse for Carrey to show off his trademark contortionist routines and impressions.

Bruce Nolin (Jim Carrey) is a self-centered news reporter who finds out while on the air that a sleaze ball colleague, Evan (Steven Carell), has gotten the anchor job he wanted. He complains that there is no justice in the world and curses God for ignoring his plight. He then quite literally gets a page from God, a Yankees hat-wearing Morgan Freeman, who tells Bruce that if he’s unhappy with God’s performance, he can do the job himself.

Bruce is then endowed with all of the Almighty’s powers. After wreaking havoc because of the self-serving aims he uses his power for, he becomes humbled, learning to better appreciate both his work and good-hearted girlfriend, Grace (Jennifer Aniston).

The movie is at its most shamelessly fun when Bruce attempts revenge with his new powers. He first runs across a gang of thugs who recently beat him up (pre-powers) for defending a homeless man. The leader of the gang tells Bruce that he would sooner have a monkey come out of his butt than back down. You can imagine what happens next.

In another hilarious scene, which possibly got the loudest laughs at the screening I attended, Bruce exacts revenge on Evan by serving as a ventriloquist, making him alternately stutter, fart and discuss his nipples while broadcasting the news. Bruce also uses his powers to woo Grace with some astounding new tricks in the bedroom.

The screenplay by Steven Koren and Mark O’Keefe has an element of cleverness. Bruce is bombarded with so many prayer requests that he creates a “Yahweh” account, and when he gets lazy, he just presses a “reply all: OK” button. Despite these inspired moments, the movie falls short of earlier comic triumphs like “Liar Liar” because of its awkwardness in dealing with the heavy religious material underlying the plot.

The writers opt for the extreme side of corny, and Carrey ultimately learns that the true miracles are mothers working two jobs and people putting themselves through school.

While this is certainly an admirable, if well-tread, message, it is quite awkwardly juxtaposed with dog urination jokes, and the two elements are never really reconciled. Instead, the moral aspect seems hurriedly tacked on, and the movie becomes quite excruciating as it winds down.

For old school Carrey fans there is still some good mindless entertainment, and if you skip out on the last 30 minutes, you’ll still get their money’s worth. And for those of you who like movies to end in cheesy, tearful confessions with an extra little heartwarming twist; well, you’ll be in heaven.