The first of Isaac Asimov’s three laws of robotics states that “a robot may not injure a human being or, through inaction, allow a human being to come to harm.” Funny how often the robots in movies don’t obey that law.

Take the rebelling replicants — artificially produced humans made for slave labor on distant outer worlds — who wreak havoc on Los Angeles in Ridley Scott’s 1982 science-fiction classic “Blade Runner.” Newer models of those replicants are back in “Blade Runner 2049,” opening this Friday in theaters everywhere.

Here are seven other movies, listed chronologically, where mechanical creations got wildly out of control.

‘Metropolis’ (1927)

In Fritz Lang’s science-fiction masterpiece, an imperious city planner, Joh (Alfred Abel), kills the working-class heroine Maria (Brigitte Helm) and replaces her with a robot double. But the robot’s builder, Rotwang (Rudolf Klein-Rogge), has his own agenda, to seek revenge on Joh for his wife’s death — and the robot Maria becomes more of a threat to the city’s elite than the real Maria ever was.

‘Westworld’ (1973)

Before Michael Crichton wrote “Jurassic Park,” he wrote and directed this story of another amusement attraction gone wrong. James Brolin and Richard Benjamin star as tourists at a theme park where they can fight a realistic robot gunslinger (Yul Brynner) — but find themselves in the crosshairs when the computer controls go haywire. The movie spawned a 1976 sequel, “Futureworld,” and last year’s HBO series.

‘The Stepford Wives’ (1975)

Feminism suffers a massive backlash in director Bryan Forbes’ satirical science-fiction thriller, in which a new resident (Katharine Ross) of a Connecticut suburb discovers most of her woman neighbors are creepily docile and domestic. Screenwriter William Goldman (“Butch Cassidy & the Sundance Kid”) adapted the novel by Ira Levin (“Rosemary’s Baby,” “The Boys From Brazil”). Pick the original over the stupidly comedic 2004 remake with Nicole Kidman.

‘The Terminator’ (1984)

Sent back in time from the human/robot wars of 2029, a lethal cyborg (Arnold Schwarzenegger, in his starmaking role) lands in 1984 on a mission to kill Sarah Connor (Linda Hamilton) before she can give birth to the human uprising’s leader. Director James Cameron showed what he could do with a smart idea and a tiny budget, before he fell into the bottomless pit of the “Avatar” sequels.

‘Deadly Friend’ (1986)

In this horror thriller, a college robotics student, Paul (Matthew Labyorteaux), gets a crush on his pretty neighbor, Samantha (Kristy Swanson). But when Sam is declared brain-dead — after her abusive father (Richard Marcus) pushes her down the stairs — Paul uses his robot expertise to reanimate her, only to watch in terror when she goes out of control. Director Wes Craven, best known for “A Nightmare on Elm Street” and the “Scream” series,” revs up the scares quite effectively.

‘Wallace & Gromit: A Close Shave’ (1995)

The third of animator Nick Park’s shorts featuring the intrepid inventor Wallace and his silent dog Gromit centers on a wool shortage and a sheep-rustling operation. But while the story centers on Wallace’s romance with a yarn-shop owner, Wendolene, the big surprise comes from her dog, Preston, who’s more machine than pooch.

‘Hellboy II: The Golden Army’ (2008)

Director Guillermo Del Toro’s second run with the cigar-chomping demon superhero (played by Ron Perlman) takes Hellboy into an underground fantasy realm, where an evil elf (Luke Goss) aims to unleash the power of the Golden Army, an assembly of mechanical monsters that could destroy humanity. The creature effects here are astounding and a good follow-up to Del Toro’s masterpiece, “Pan’s Labyrinth.”