Police responded to a robbery of a coffee shop in a Los Angeles suburb and one officer nearly pulled the trigger on a student with a fake gun filming a movie, only the cops did not know it was staged.

According to an audio recording obtained by the Associated Press, one officer can be heard yelling to the film students, "drop the gun! Drop it! Drop it!" One put down the fake gun immediately and the other did not.

Glendora police Capt. Tim Staab told the AP one of his officers did something strange after the second student kept the fake gun at his side, but pointed toward the ground. The officer knocked it to the ground from his hand instead of firing at the kid for not following the instruction.

"One of the officers made the decision that had the man moved, he would have been killed," said Staab. "It was just milliseconds from a tragedy."

That student, and possibly even the other as well, were saved by a split-second, life-or-death decision.

"I can't think of a situation more dangerous than having a gun in your hand with cops responding," Staab said. "It was much closer than we ever want to get close to."

After the students were cuffed, police asked them what was going on and someone on the tape was heard saying a film was being shot.

"You are shooting a short film?" the officer asks. "In a store with a man with a gun?"

The filmmakers did not have a permit to record film on location, they did not have a sign on the door, nor did they have a person outside to warn people the robbery was being staged. An onlooker made the 911 call when she saw armed and masked gunmen inside the Glendora Classic Coffee shop.

The students' firearms were clearly not real, but had covered in black pen an orange mark to indicate their replica status, making them appear to be actual guns.

The director of the film did not respond for comment and the students declined to say what school they attended. They were not charged with anything, but received a scolding lecture from the officers.