THOUSAND OAKS, Calif. (AP) — As terrified people scrambled out of broken windows, screaming and bleeding and fleeing a mass shooting inside a California bar, Sgt. Ron Helus and a highway patrolman decided to try to stop the gunman, running in together with assault-style rifles to what turned out to be an ambush.

Almost immediately inside the dark and smoky bar, the gunman fired on the officers, hitting Helus five times. They retreated and returned fire.

What happened next is every officer's worst nightmare: One of the patrolman's bullets hit his fellow policeman, piercing his heart and killing him.

That Helus was killed by friendly fire emerged for the first time at a somber news conference Friday, exactly one month since 28-year-old Ian David Long attacked country-music lovers at the Borderline Bar and Grill in the Los Angeles suburb of Thousand Oaks, killing 12 and wounding 22 others.

Long, who wasn't hit by either officer's gunfire, fatally shot himself after the firefight.

Officials didn't have much else to update about the investigation Friday, nothing more on the motive or the exact timeline of events — just the news that broke all their hearts, most of all that of the patrolman, who learned of the terrible mistake for the first time Thursday.

"I delivered the message to him ... He had no clue it was coming," said L.D. Maples, chief of the California Highway Patrol's coastal division. "It surprised all of us. He's devastated."

The patrolman was only identified as a nine-year veteran of the department. He is on leave.

"We're trying to take care of him right now," Maples said.

Helus was wearing a bulletproof vest when he was shot, but officials did not say where the bullet entered his body. His wounds from Long's handgun were serious, but potentially survivable, including two that hit Helus on the edge of his vest, said Christopher Young, the county's chief medical examiner.

Most body armor worn by police officers in the United States can be pierced by bullets from an assault rifle, Ventura County Sheriff Bill Ayub said.

Story continues

Stronger armor is available, often at an officer's own expense, but many don't like it, he said, as it can be heavy and cause fatigue.

The finding that Helus was killed by another lawman did not diminish the heroism shown by both men, and no one is to blame but the gunman himself, Ayub said.

"He went there with a plan and a purpose and that was to take innocent lives," Ayub said. "The burden lies solely with him, not with those who tried to save lives."

He called the situation unavoidable.

"This was a dynamic, chaotic event that led to a very brief but furious gunbattle between the killer and the lawmen," he said. "Sgt. Helus and the CHP officer both knowingly and willingly went into what can only be described as a combat situation, risking their own lives to save others ... They were ambushed almost immediately."

Long threw smoke grenades into the bar, obstructing what employees and patrons could see before he opened fire. He used a flashlight with a laser sight attached to his .45-caliber semi-automatic pistol as he fired.

Panicked revelers ran for the doors, dived under tables and piled on top of each other in an effort to dodge the gunfire. Others ran for their lives through other exits or broke through windows and jumped out, injuring themselves in the flight.

Long, a Marine veteran, took a tactical position and lay in wait for the officers.

Helus, a 29-year veteran of the department, was close to retirement when he was killed. He is survived by a wife and son.

___

Associated Press writers Brian Melley and John Rogers in Los Angeles contributed to this report.