A surfer in a bikini battles a shark: it sounds like something a coked-up Hollywood exec would come up with five minutes before a meeting. Yet The Shallows turns out to be a perfectly decent piece of Friday-night survival-horror hokum, with a few clever wrinkles.

The obvious comparison – and the benchmark by which all shark attack films are judged – is Jaws.  However, this lean thriller has perhaps more in common with Danny Boyle’s endurance test of a survival film, 127 Hours. Surfer Nancy (Blake Lively, impressive in a physically demanding role) decides to catch one last wave in an isolated cove in Mexico. But she inadvertently disturbs the feeding site of a great white shark and finds herself bleeding from a leg wound and perched precariously on a rock, tantalisingly close and impossibly far from the shore. Using just her wits and her medical training, plus a GoPro camera that miraculously survives getting masticated by the shark, Nancy must outsmart a fish with a grudge.

Director Jaume Collet-Serra gives the film an arty sheen: there are some nifty visuals, including text messages that pop up in mid-air and an early, dread-inducing glimpse of the killer fish via silhouette as it glides through a wave on which the heroine is surfing. Blake Lively, too, is on excellent form as said heroine, Nancy, coming equipped with a tragic backstory that gives the movie a trifle more depth than, say, Deep Blue Sea. Unlike that unabashedly stupid Renny Harlin classic, this tries to establish its set-up with at least a smidgeon of verisimilitude, providing a reason for the shark to stay in the vicinity in the form of a bloated whale carcass.

The mechanics of survival – Nancy’s ingenuity rivals that of Robert Redford’s embattled yachtsman in All is lost– make compelling drama. Costume jewellery provides a makeshift suture; Nancy even finds time to fix the dislocated wing of a seagull. Less effective is the film’s clumsy attempt at a sympathetic back story: Nancy is visiting the beach to seek a connection with her late mother, who also surfed there. The spirit of the dead mother – she was a fighter, we are pointedly told – looms large over Nancy’s struggle against the relentless killer fish.