Anything could have gone wrong on the set of the spy thriller, but no one would have guessed that the safety of the cast would be compromised in this scene.

There's no doubt that Kingsman: The Secret Service is an action-packed stunt-filled thriller, with a million little things that could have gone wrong, with the potential to injure not only the cast but also the crew. In fact, something did go wrong on set, something that could have killed the cast, and it was all down to rogue computers.

Anything could have gone wrong on the set, but no one could have guessed this would happen. According to Matthew Vaughn, the writer, director, and producer of the film, there was a scene that didn't go as planned and could have ended badly for the cast.

Digital Trends

Speaking on The New York Times Youtube series, Anatomy of a Scene, Vaughn explained the complexity, and as it turns out, the struggle to film the underwater scene at the beginning of the movie. Eggsy has just been recruited for the trials to become the next Kingsman, and he and all the other recruits are sleeping in the barracks when their first test comes unexpectedly in the form of the room filling with water. They all swim for the toilet pipes to get air but Eggy takes it upon himself to smash the two-way mirror and save the entire squad.

Related: 18 Movies You Didn't Know Were Based On Comics

According to Vaughn, the room the squad was sleeping in was made to accommodate the water, and when they were ready to film the scene they lowered the room into a pool. Vaughn said filming the scene was the hardest part of making the movie, but what made it even more difficult was the fact that the computers controlling when the room was submerged completely went rogue and submerged the room by themselves. So apparently the shocked faces of the characters were real and their genuine reactions to the water engulfing them.

"This scene takes place on the first night of the new recruits who are training to become Kingsman, their in their dormitory being told to get a good nights sleep, your training and tests begin tomorrow morning and suddenly a very nice dormitory becomes a very dangerous situation where it fills with water and they have to figure out how to escape," Vaughn explained in the scene.

Related: 10 Best Spy Movies Of All Time (And 5 Worst) 

"And the way we shot it was- we built a dormitory above a swimming- well above a tank- which is like a big swimming pool inside and on action, we rehearsed it with you know without the water, and then we lowered the set into the pool and it's all real, there's no CG, and it was a disaster. The first day of filming and it was a much more complicated scene and we realized that. It was very hard to get the actors to say their lines at the right place, to look at each other, and so in the end we said you know what let's just shoot it and we'll do it really controlled, that we'll only drop the set four feet at a time, stop it, and each actor will know at four feet to say one line, then we'd stop, get ready, the next line at six feet and we say action and the computer went wrong and the whole thing went 25 feet down. And the feat you see in these kids, there was no acting, they were terrified. It just went down and we lost all our cameras, sound and from that point on that look of fear was really because we fixed the computer and we just had to get these kids to- get ten people underwater to behave and act in the right place, and get the camera in the right place...it's very difficult."

YouTube

It's sort of scary to hear that the fate of the cast's lives were in the hands of a faulty computer. Water is already dangerous to film in, and on top of that, not hearing "action" from anyone and suddenly being dropped 25 feet into the water, had to be a really big shock on the cast, it would have caused an unbelievable tragedy. Fortunately, they made it out alright, the malfunction was eventually fixed and the cast went on to do even bigger stunts.

Next: 20 Actors Who Hurt Themselves Doing Their Own Stunts