UPDATED with video, 1:58 PM: There was a scary incident in small-town Indiana last week when a uniformed police officer came upon what he thought was a robbery in progress. Turns out it was a movie production, but the gun-toting actor didn’t respond quickly enough to officers’ commands to drop his weapon, and one of them fired a shot that missed him. It was all caught on an officer’s bodycam, and the Crawfordsville Police Department has released the harrowing footage. Check it out above.

PREVIOUSLY, October 1: An independent filmmaking crew learned an important lesson last week – always get your permits and notify all local businesses that you’re making a movie.

The Crawfordsville (Indiana) Police were called to the Back Step Brewing Company last Tuesday on a possible robbery-in-progress call. When they arrived, they saw a masked man come out of the brewery holding what appeared to be a gun. They ordered the man to drop it, and when he didn’t react quickly, the police shot at the man. They missed, striking the building.

The “robber,” aka actor Jeff Duff, then doffed his mask and dropped the gun, shouting that he was making a movie. He barely escaped a fatal shot, according to bystanders, as a bullet whizzed by his head.

“It was very close,” said actor Phillip Demoret to local TV station RTV6. “I don’t want to think about it. If it had hit him, we’d be having a whole different conversation.”

The Indiana State Police were consulted and determined that a unit called Montgomery County Productions was filming at the location. However, no one – not the production company or the brewery – had notified the police or nearby businesses about the shoot.

Indiana State Police Sgt. Kim Riley said that, in light of that, the police shooting at Duff was understandable. “When the police said ‘Drop the gun,’ he turns toward police pointing the gun. If you don’t know it is a movie scene, how are you supposed to react? I know if it was my situation, I probably would have done the same thing.”

Kodi Swank, co-owner of Montgomery County Productions, said both sides gained something from the encounter. ‘There’s a lesson to be learned on both sides of the spectrum from us as a low budget movie company and from the police department on their quick reaction. “I’m very grateful that the police department did their job to the best of their ability with an unknown situation.’

The Indiana State Police said the shooting remains under investigation.