The bullet responsible for killing a Ventura County Sheriff’s sergeant during November's mass shooting at the Borderline Bar & Grill was fired by a California Highway Patrol officer, authorities said Friday.

Sgt. Ron Helus – who was nearing retirement – was also struck by five rounds from 28-year-old gunman Ian David Long.

But it was the sixth round, fired by a fellow law enforcement officer, that struck Helus heart and killed him, Ventura County Sheriff William Ayub said during a Friday press conference.

"It was just a tragic detail that unfolded so rapidly, in my view it was unavoidable," Ayub said. "They were ambushed almost immediately."

Helus responded to the scene after Long stormed into the Thousand Oaks bar Nov. 7 and sprayed the crowd with gunfire, killing 12 people.

CALIFORNIA SHERIFF'S SGT. RON HELUS KILLED IN BAR SHOOTING, 'DIED A HERO,' MADE LAST CALL TO WIFE

Long threw smoke grenades into the crowd, obstructing what they could see before he opened fire. He then used a flashlight with a laser sight attached to his .45-caliber semi-automatic pistol as he fired at the establishment, which was filled mostly with young people dancing to country music.

Helus has been credited as being a hero after he rushed into the bar to confront the gunman.

Panicked revelers smashed windows, dived under tables and piled on top of each other in an effort to dodge the gunfire.

Long later killed himself.

Ayub said the fatal shot did not diminish the heroism shown by the officers. The CHP officer was not identified but is a 9-year veteran of the force who is on leave.

The Associated Press contributed to this report.