For many Americans, the blockbuster movies we watch represent an essential reprieve from the stress and anxiety of real life. Hollywood’s ability to grant us a few hours of peace amid a world embroiled in chaos is perhaps its most significant strength, but rarely do we, the viewers, put much thought into just how miserable making these films really can be. Legends about Stanley Kubrick’s hundreds of takes or James Cameron’s undersea insanity aside, sometimes the most difficult roles for actors aren’t in lofty auteur films. Sometimes it’s the popcorn movies you don’t put much thought into that really push actors to their breaking points.

Of course, most of the time when a movie drives its stars insane, it’s because of a personality conflict between them and the director. Other times, actors using the “method” delve so deeply into the characters they play on screen that they begin to lose themselves entirely (see: Jared Leto losing himself in the Joker for Suicide Squad despite the movie being terrible). In the case of Jim Carrey, however, it wasn’t a conflict with his director or issues with his acting method that nearly made him walk away from a hundred-million dollar blockbuster back in 2000. It was the costume.

Of all the crazy roles Carrey has played, it was the Grinch that nearly broke him.

“That first day, the makeup took eight-and-a-half hours. It was like being buried alive,” Carrey recounted later. By the end of that first day of shooting, Carrey approached famed director Ron Howard to tell him he’d have to drop out of the film because the costume, makeup, and prosthetics made him feel so claustrophobic he was struggling to function. For Howard and his partner, Hollywood producer Brian Grazer, this would mean the end of the film itself. Dr. Seuss’s widow, Audrey Geisel, had only sold them the rights to make the movie predicated on the idea that Carrey would play the titular role.

“We had to keep the makeup, and we had to keep Jim—but we had to find a way to make it possible for him to endure something that felt like being tortured,” Grazer recounted in a piece he wrote in 2015. It was actually Grazer that would ultimately devise a solution: he’d call his old friend from the CIA that specialized in teaching agents how to withstand torture.

“We had an actor being held prisoner by his costume—he was being tortured by his makeup,” Grazer said. “Maybe the CIA specialist could teach Jim Carrey to survive the green Grinch makeup the way he’d taught spies to survive hostile interrogation?”

No hammer. No problem.

Read Next: No hammer. No problem.

He made a call and the unnamed CIA specialist hopped on a plane that very Friday. He and Carrey then locked themselves in a room for the majority of the weekend, where the instructor taught the comedian different methods CIA agents employ to frame their thinking, distract themselves from pain and discomfort, and how to develop the mindset required to overcome the panic Carrey felt inside the costume.

Carrey would later refer to his weekend of CIA training as “quite hilarious,” but it’s hard to argue with results. After attempting to quit the first day, Carrey went on to don the Grinch makeup for a hundred more days of filming. And it proved worth it — the film went on to make $345 million in theaters and win an Oscar for — what else — best make up.

Of course, Carrey doesn’t credit the help he received from his CIA trainer for his success — but CIA officers are accustomed to working without accolades, I suppose.

You can watch Carrey recount his experience below: