Director Vincenzo Natali made his feature film debut with this gruesome, Kafkaesque nightmare. Mathematics, survival horror and confinement might seem like unlikely bedfellows, but in Cube Natali blends them all together into a flawed but still heady cocktail that somehow works.

A man (Julian Richings) in a cube-shaped room is killed when a web of razor wire descends on him, cutting him into small pieces. Elsewhere, five people – cop Quentin (Maurice Dean Wint), office worker Worth (David Hewlett), doctor Holloway (Nicky Guadagni), mathematics student Leaven (Nicole de Boer), and prisoner and renowned escape artist Rennes (Wayne Robson) – all strangers to each other find themselves converging on another cuboid room, none of them with any idea of where they are or how they got there. The room is connected to six others via doors in the centre of each of its faces and they, in turn, are similarly connected. Quentin has found that some of the rooms are booby trapped and Rennes tests neighbouring rooms by throwing a boot through the door, assuming that the traps are triggered by motion detectors. The group argues about where they are and who put them there – they suggest everything from the “military-industrial complex” to aliens to a single extremely wealthy psychopath. The group are subsequently joined by a mentally challenged young man named Kazan (Andrew Miller) and Leaven works out that numbers embossed on the sills of each door are Cartesian coordinates and that the greater cube they are trapped in must contain 17,576. As the group heads for what they believe is the “bridge room” and a way out of the prison, they fall foul of booby traps and their own growing paranoia and distrust.

To test of the technical limitations and narrative possibilities of a film about a group of people trapped in a confined space, Natali directed a short film, Elevated (1996) in which a trio are trapped in an elevator by a dangerous monster that is apparently lurking outside – the short also featured British born Canadian genre staple David Hewlett (Pin…. (1988), Scanners II: The New Order (1991), Cypher (2002)) and was co-written by Karen Walton, writer of Ginger Snaps (2000) and Ginger Snaps 2: Unleashed (2004).

There’s an echo or two of Rod Serling’s brilliant The Twilight Zone (1959-1964) episode Five Characters in Search of an Exit (22 December 1961), in which five characters in uniform find themselves trapped in a cylindrical room with no immediate means of escape. On the other hand, it’s collection of horrible traps inflicted on people who have no idea why they’re being subjected to this horror anticipates the Saw franchise. But where the Saw films became increasingly rote and mechanical, Cube still feels ingenious today. There’s still much simple pleasure to be had in watching the group trying to solve puzzles and find a way out while simultaneously falling apart. Natali called on mathematician David W. Pravica to help him design the cube and the intricate mapping system which even those of us most averse to maths can’t fail to find stimulating.

Natali understands that any answers the film might offer as to the identity of the cube’s designers or its real purpose would inevitably disappoint so he declines to provide one. It remains a =n enigma to the very end. The best we get comes from Worth: “It’s a headless blunder operating under the illusion of a master plan.” The hideous truth is that the cube is essentially pointless, a folly whose original purpose has already been forgotten and that the prisoners are there simply to justify its costly existence.

It’s a brilliantly economical idea for a cash strapped arthouse film – for most of the film, it needs just one set, the claustrophobic rooms that the cast move through, different lighting scenes and occasional set dressings indicating that we’ve moved on to a new chamber. Natali and his director of photography, Derek Rogers, wring considerable tension from their single 14-foot square set, beautifully designed by Jasna Stefanovic, particularly in a nerve-wracking moment where the team have to silently traverse one of the chambers that has been rigged with a sound-activated trap.

Rogers’ disconcerting camerawork heightens the claustrophobia, his cameras floating effortlessly around the cramped rooms, always in the right place to perfectly catch the net moment of horror inflicted on the prisoners. Inmates are cut into neat cubes by razor wire (an effect lifted by Paul W.S. Anderson for Resident Evil (2002)), faces are melted off by acid and fall to their deaths in the stygian void between the chambers and the outer skin of the cube. It’s nasty stuff for a film that affects such lofty academic pretensions, and the strange mix of visceral gore and mathematical inquiry is often exhilarating.

Performances are sometimes shaky – some performers fare better than others – but credit to Natali for at least trying to make interesting characters (all of them named after prisons) out of ones that could so easily have been off-the-peg stereotypes. They’re all let down by some clunky dialogue that even more experienced actors would have struggled to make sound convincing. But there’s an interesting character arc in which Quentin starts out as a relatable everyman whose resourcefulness marks him as a natural leader and potential survivor before he gradually transforms into a raving, mistake-making and murderous psychopath as desperation and frustration take hold, and the characters are drawn just well enough for us to care, even if only a little, when they meet their grisly ends. There’s a nice ironic gag early on when escape artist Rennes, who has already broken out of seven prisons, is killed off early when a trap sprays acid in his face.

Cube is a triumph of low budget ingenuity, a film that takes the simplest of ideas and the most meagre of sets and turns them into a thoughtful and stimulating thriller that led to a brace of sequels, the intriguing Cube2: Hypercube (2002) and the less than fascinating prequel Cube Zero (2004). A remake, provisionally titled Cubed, has been in development with Saman Kesh at the helm for many years but has been beaten to the screen by a Japanese version of the same story, also titled Cube (2021) and directed by Yasuhiko Shimizu. Natali went on to make a string of equally interesting genre films, among them Cypher, Splice (2009) and Haunter (2013). For many years he was linked with the endlessly fraught attempts to bring William Gibson’s cyberpunk classic Neuromancer to the screen but by 2021 was in pre-production on another Gibson adaptation, The Peripheral.