Anyone worried that the recent demise of Walter Matthau might cause an interruption in the flow of geezer movies can breathe a sigh of relief. Clint Eastwood has stepped up to the plate and made a solid, if flawed, specimen of the genre, featuring no fewer than four old coots, rather than just the two that Matthau and Jack Lemmon usually brought us. He’s also added a goodly measure of action and melodrama to the mix, so that what you get isn’t just “Grumpy Old Astronauts” but “Apollo 65+” as well. “Space Cowboys” has its humorous side, especially in the first hour or so, but by the halfway point it’s turned into a adventure flick with tear-jerking overtones that just happens to feature senior citizens; this second hour showcases some first-rate outer-space effects and a heavy dose of old-fashioned heroics and self-sacrifice, with only the occasional wisecrack.

The plot is a simple one. Four old flyboys–we’re introduced to them in their earlier guises in a black-and-white prologue that might be christened “The Wrong Stuff” and features the older stars’ voices emanating from much younger lookalikes– are summoned out of retirement to undertake a mission in space–the repair of a malfunctioning Russian satellite employing technology so primitive that today’s young whippersnappers can’t fathom it. The plot eventually turns into a sort of geriatric version of “Armageddon” or even “Mission to Mars” (without all the goofy mysticism of Brian De Palma’s bomb), but it’s enough of a thread on which to string plenty of early-on bickering among the codgers and a good deal of third-act action and suspense. And the oldsters–Eastwood himself, James Garner, Donald Sutherland and Tommy Lee Jones (who’s really too young for the part, but whose weather-beaten face allows him to pass muster)–prove an engagingly sharp-tongued bunch; they’re like the members of an aging, tonally-mellow, still-vigorous string quartet, happily passing phrases to one another and generously supporting each other’s solos. Garner, it must be said, seems so arthritic that it stretches credulity to believe he could pass the physicals that take up a good deal of the first half of the film, but he’s a likable presence, doubtlessly relying on his previous experience in this genre when he starred with Lemmon in what would ordinarily have been Matthau’s role in “My Fellow Americans” (probably because the suits felt that audiences would never accept misanthrophic Walter as an ex-president). Sutherland has a field day playing a randy senior citizen; he proves as adept an ensemble performer as he was way back in “M*A*S*H.” Eastwood does his customary crusty shtick with his usual laid-back elegance, and as director he’s done a smooth job, even if the movie mimics his recent work in proceeding somewhat sluggishly and running a tad overlong. Clint also demonstrates his lack of ego by allowing Jones much of the best material, including a late-life romance with a NASA scientist (Marcia Gay Harden) that has its touching moments before duty intervenes.

“Space Cowboys” has problems, and some are serious. The big twist toward the close that puts the mission (and more) in peril is telegraphed so early on that when it comes, it’s hardly a surprise. As a nasty NASA bigwig who stabbed our heroes in the back forty years ago (he replaced them with a chimp, figuratively making monkeys of them) and who’s still untrustworthy, James Cromwell is stuck playing a stock villain again (it’s like his role in “L.A. Confidential” without the introductory shadings). The two younger astronauts, played by Loren Dean and Courtney B. Vance, are ciphers, and the former’s real function is made painfully obvious much too early. Even worse, the precise strategic connections of the plan to save the day at the close aren’t delineated with sufficient clarity; there’s just a lot of jargon-spouting and seemingly arbitrary derring-do, with a final shot in particular that’s absurdly maudlin.

But these problems aren’t enough to sink the enterprise. With “Space Cowboys,” Eastwood has successfully done a Hitchcock by running for cover (and the tried-and-true) after a couple of disappointing flops (in this case, 1997’s lugubrious “Midnight in the Garden of Good and Evil” and 1998’s ludicrous “True Crime”). The ploy has worked. The concept behind the picture may be so high that the space shuttle so prominently featured here would itself have difficulty reaching it, but despite the defects of the script, the ingratiating cast pulls off their mission with the ease of the old pros that they are.