Even though “Frasier” star Kelsey Grammer lost some ratings going head to head against Tim Allen in “Home Improvement” this season, Allen has indirectly helped Grammer make about $2 million for his first starring film role.

Sitcom stars have become hot movie properties, especially after the success of Allen’s Disney film “The Santa Clause.” Grammer was pursued by four studios, and Fox will pay him about $2 million to make his feature starring debut in the comedy “Down Periscope,” scripted by Hugh Wilson (“Guarding Tess”). Grammer will play a slightly irreverent naval officer trained on a nuclear sub, who finally gets to command, only to find he’s captaining an old diesel sub. The project is expected to set sail this spring, after Grammer wraps the second season of his sitcom at the end of March.

Though Crammer’s untested as a box office commodity, he has been in hot demand lately. New Line offered him one of its best comedies, “The Best Man,” which Jim Carrey originally was supposed to do, but Grammer didn’t want to play another psychiatrist role. Disney wanted him for several things, including playing Wilbur in the screen version of the TV series “Mr. Ed,” but Grammer didn’t want to play a TV character in his first film. And Mel Brooks badly wanted him to play the title role in his new spoof film “Dracula – Dead and Loving It,” offering Grammer $3 million for that role, with Brooks playing the vampire hunter Van Helsing.

Instead, Grammer will be making slightly below the $2.2 million that fellow sitcom star Ellen DeGeneres will get from Disney for “Mr. Wrong.”