Don’t be dissuaded by the crude, unfunny trailer, and don’t mind that the screen writers’ only previous effort was the rotten Destiny Turns on the Radio. Life, starring Eddie Murphy and Martin Lawrence, is an uneven but extremely funny throwback to ’70s hits like Uptown Saturday Night and Stir Crazy. The story, covering 60 or so years, begins in Prohibition Harlem, where Ray (Murphy) is a con artist and Claude (Lawrence) is an earnest bank teller. They quickly run afoul of a bootlegger (an unrecognizable Rick James) and are forced into a dangerous moonshine run. During the overlong, choppy setup, they bungle the deal, lose the bootlegger’s money, and find themselves on a Mississippi prison farm with no hope of parole.

At this point, it looks as though the story will be a slog through some dreary men-in-the-slammer gags, but trust director Ted Demme (The Ref) to balance the grim setting and episodic structure with free-form verbal comedy and showcase moments for the stars. Nothing flashy: the movie’s best scenes feature the inmates simply razzing one another about women, baseball, and their respective criminal records. (At one point, Ray’s dreamy chatter about a Harlem nightspot explodes into a full-scale musical fantasy, with each inmate imagining himself in tuxedoed splendor.)

Strangely, Life bears some resemblance to Life Is Beautiful, which put a sugary gloss on the Holocaust. But Life is a comic tall tale rather than a bogus fairy tale, and it never lets you forget that Claude and Ray have been robbed by bigotry and injustice. (When a seventyish Claude is briefly allowed outside the prison walls, he finds himself bewildered by the changed world and grieving for the life he has been denied.) Both leading men have had their troubles recently and it’s gratifying to see both stars at their best, in a movie that transforms a clichéd buddy comedy into something worthwhile.