Graphic police bodycam video released Tuesday shows three Los Angeles cops fatally shooting a knife-wielding gang member and the woman he was holding hostage with the blade to her throat.

Cops fired 18 rounds during the confrontation outside a homeless outreach center in Van Nuys on June 16, which unfolded when they responded to a report that a man had stabbed his ex-girlfriend, LAPD Chief Michael Moore told reporters at a news conference.

The video shows ex-con Guillermo Perez, 32, ignoring repeated commands to drop the knife he was holding, and shielding himself with a metal folding chair when cops used shotguns to fire non-lethal beanbags at him.

“He moved away from officers and grabbed an innocent bystander who was standing nearby,” Moore said, according to KABC-TV.

“Perez began to cut the innocent bystander’s throat with a knife. That’s when three officers shot at Perez to stop his actions and prevent him from killing the hostage.”

Video shows both Perez and hostage Elizabeth Tollison, 49 — who was standing with the help of a rolling walker — crumple to the sidewalk amid the hail of gunfire.

Moore called Tollison’s tragic killing the result of “a tense situation that unfolded very quickly.”

“It’s every officer’s worst nightmare,” he added.