When Jake Gyllenhaal signed on to play a brash, ambitious young cop in David Ayer’s End of Watch, he took his training to the extreme.

The 31-year-old actor beefed up and shaved his head, military-style, to play Officer Taylor, who patrols the meanest, most gang-addled streets of south central Los Angeles alongside his partner, Officer Zavala, played by Michael Pena. The two, who are also best friends, run into trouble when they see something they shouldn’t.

“I spent five months on the streets with, like, three sets of police officers from the sheriff’s department and from the LAPD for five months, three nights a week, from like 4 in the afternoon til 4 in the morning,” Gyllenhall said at THR’s special screening of the film at Goose Creek in East Hampton, N.Y.

“Then we did fight training — pretty much every day with the exception of the weekend — and then tactical training for two days a week with live ammunition. So it was a five-month, I would say, ‘recruitment process,’ in a way. It was very intense. Not your normal, ‘yeah, I did a few ride-alongs type situation,'” he added of preparing for the role.

In between stretches of “nothing happening,” Gyllenhaal “was in the midst of stolen car chases .. and murders and domestic violence, and that was the dramatic part of it.”

Ayers wrote and directed the adrenaline-packed drama, which opens Sept. 21 and also focuses on Gyllenhaal and Pena’s personal lives; Anna Kendrick and Natalie Martinez portray the officer’s wives, respectively. America Ferrara and Cody Horn also have supporting roles as super-tough, super-professional cops.

In a recent interview with THR, Horn — a rising actress who played Channing Tatum’s love interest in Magic Mike — said she, along with Gyllenhaal and other End of Watch officers, were tased as part of real-life police exam. “Then Jake had to do it and then we ended up tasing the entire cast,” she recalled.

“Oh no, I did not tase anybody!” Gyllenhaal insisted. “I did not tase anybody but we were all tased, the whole cast. We all decided that we thought it would be sort of a semi-bonding experience. … When we had a choice between pepper spray and being tased, we were all told by the professionals that tasing was probably the preference because pepper spray lasts for a long time after. And a tase is done in moments. So we decided to go for quick and painful.”

Now sporting a beard and a full head of hair, Gyllenhaal is preparing for his American stage debut in the off-Broadway play If There Is I Haven’t Found It Yet, which begins previews Friday at the Laura Pels Theatre in New York City. The show officially opens Sept. 20.

Last week, THR reported that Gyllenhaal was in talks to star in Mississippi Grind, a gambling drama from Half Nelson directors Ryan Fleck and Anna Boden.

Watch the video of THR’s Gyllenhaal interview below.