Prosecutors in California have released an intense bodycam video showing the moment a suspect opened fire at an officer before his partner returned fire, striking the individual in the head. 

The gunfight that resulted in the death of 22-year-old Matthew-Tuan Ahn Tran happened on Aug. 6, 2021, outside the La Habra Police Department headquarters in the Los Angeles area. 

A woman called 911 that evening to report that Tran – whom she had never met before – was tailgating and following her on her way home from work, the Orange County District Attorney’s Office says. La Habra dispatchers instructed the driver to pull up outside the police station. Tran followed, parking his vehicle behind the woman’s before exiting and walking to the doors of the building.

"What’s going on here?" La Habra Officer Mark Milward is heard asking Tran after arriving at scene and approaching him. 

MARYLAND SHERIFF’S DEPUTY IS SHOT DURING HIGH-SPEED CHASE 

La Habra Police Department officer shot in California

Matthew-Tuan Ahn Tran is seen opening fire at a La Habra Police Department officer before being shot himself. (La Habra Police Department)

"Uh, I’m just seeing somebody right now," Tran responds. 

After asking Tran if he is associated with the two cars pulled up outside the entrance – which Tran says he was not -- Milward’s body camera shows him walking back toward the vehicles. 

"Well, they’ll get you in a second, OK?" he says. 

The footage then shows Milward turning around to reveal Tran pointing a gun at him. Tran then opens fire. 

MAN PULLS GUN ON MICHIGAN OFFICER AFTER WALKING INTO STATION, COP RESPONDS WITH LETHAL FORCE 

Shooting outside La Habra Police Department in 2021

La Habra Police Officer Mark Milward is seen falling to the ground after being shot. (La Habra Police Department)

After being hit with a bullet, Milward tumbles to the ground and is heard groaning in pain. 

Prosecutors say "one round pierced Officer Milward’s bulletproof vest striking him in the right upper chest," but that he later "would recover from the gunshot." 

Milward’s partner, Officer Abigail Fox, "drew her gun and fired five rounds in rapid succession at Tran," one of which "struck him in the head and caused him to fall to the ground," the Orange County District Attorney’s Office said. 

More police and first responders arrived and Tran – after being disarmed and handcuffed -- was pronounced dead at the scene. 

Matthew-Tuan Ahn Tran shot in California

Surveillance footage shows Tran pulling a handgun out of his waistband just prior to the shooting on Aug. 6, 2021. (La Habra Police Department)

CLICK HERE TO GET THE FOX NEWS APP 

An autopsy showed Tran had marijuana and methamphetamine in his body following his death. 

Fox, the district attorney’s office also said, acted in a "reasonable and justifiable manner" responding to the incident.