"I made the mistake," Fred Carpenter told The Associated Press in a telephone interview. "I was supposed to tell the local police precinct what we were doing."
Carpenter was filming inside convenience store in Bellmore, on Long Island, on Tuesday morning in a scene in which a gunman takes a number of people hostage. A passer-by apparently thought it was the real thing and called police.
"All of a sudden I'm directing and 15 police officers come in," Carpenter said. "And for a moment I'm thinking it's part of the movie and then I said, wait a minute, I wrote the movie and this wasn't in the film. And it was like, insanity."
Nobody was injured, but police said the outcome could have been tragic.
"The officer went inside, the actor - it turned out to be - still had the gun in his hand," said Detective Mike Bitzko, a Nassau County police spokesman. He said responding officers "showed great restraint" disarming the situation.
Because he was filming on private property inside the store, officials and Carpenter said he was not required to obtain a county film permit, but Bitzko said police need to be notified about scenes involving gunplay.
Carpenter had praise for the police response and noted his film, "Jesse" is about a fictional Nassau County police detective named Jessica Weinstein who investigates the death of her brother. One of the film's stars is Burt Young, best known for his role in "Rocky." The actor who played the gunman was Mike Tattoo, Carpenter said.
"When you're doing independent films, you're working on budgets of a couple hundred grand or less," he said. "We try to use as many private locations as possible. We were so close to the highway, I guess we didn't realize that people would be looking in."
He said he would reschedule the shoot and promised to contact police ahead of time.
"They're there to protect us and something bad could have happened."