Though the compelling sci-fi epic “The Martian” (Fox) is an unusually long movie, what viewers of faith may cherish most about this masterful adventure is a single line of dialogue in the form of a three-word prayer.

Brief as it is, this one utterance — made all the more eloquent by the apparently casual tone in which it’s pronounced  — represents a ringing affirmation of belief in divine assistance.

Few have ever needed the aid of providence more than the character who delivers this line, astronaut Mark Watney (Matt Damon). At the time he offers his short plea to God, Mark is alone on the surface of Mars, more than 30 million miles away from home.

The film’s opening scenes recount the series of unexpected occurrences that led to Mark’s terrifying plight. The botanist on a NASA mission to the Red Planet — “The Martian” is set in a version of the near future where such journeys are more or less routine — Mark, like his colleagues, was forced to abandon his work on short notice due to the sudden arrival of a fierce windstorm that threatened to destroy their rocket.

As they all scrambled to depart, Mark was struck by flying debris and swept out of sight in the tempest, leaving his crewmates, led by conscientious Commander Melissa Lewis (Jessica Chastain), with no time to mount a rescue attempt. Back on Earth, NASA director Teddy Sanders (Jeff Daniels) delivered the bad news to the public, officially announcing Mark’s death.

Though Mark is, of course, alive — albeit wounded — his chances for long-term survival are bleak. He has only limited supplies of food, water and power — and no means of communicating with anyone.

As it charts Mark’s desperate struggle to turn his situation around, director Ridley Scott’s screen version of Andy Weir’s novel skillfully uses its protagonist’s dread-inspiring predicament to examine fundamental aspects of the human spirit: courage and ingenuity, the fear of isolation and the yearning for solidarity.

Along the way, screenwriter Drew Goddard’s script touches on religion only once more — and again just in passing. Yet the picture’s respectful, if incidental, treatment of the subject continues to draw power from its own understatement. The screenplay’s faith-affirming overtones also register as all the more pointed given the science-celebrating context which surrounds them — a setting in which such views might mistakenly be thought to be out of place.

Based on the fine quality of its values, at least some parents may consider “The Martian” acceptable for older teens — the elements of potential concern listed below notwithstanding.

The film contains some medical gore, a flash of rear nudity, scatological and other mature references, a couple of uses of profanity, at least one rough term and occasional crude and crass language. (A-III, PG-13).