When the gunfire started in the early morning hours of July 4, four Long Beach police officers believed they were under attack.

The shots were so close that bullets ricocheted off the ground next to them, according to a police source familiar with the situation.

The officers took cover and told dispatch what was going on, according to the LBPD. Almost immediately after, there was another burst of shots, a department spokeswoman said.

Backup came rushing to the scene to help the officers, who all escaped unwounded, police said.

The LBPD called in SWAT and their highest-level investigators to probe what they suspected was a murder attempt on police.

But a day later, they think the evidence is pointing toward a more complicated situation.

Investigators now suspect the gunfire was from at least two different shooters targeting each other or someone else in a situation that was likely unrelated to what the officers were doing, according to an internal bulletin LBPD Chief Robert Luna sent Thursday afternoon.

The four officers just happened to be nearby investigating reports that a car had hit a fire hydrant and then fled the crash on Pacific Coast Highway near Walnut Avenue.

Around 1 a.m., the gunfire erupted so close to them that bullets were “whizzing” by, according to a police source who wasn’t authorized to speak publicly.

“There was no doubt from officers that they were under attack,” the source said.

Investigators are still treating the investigation as attempted murder on a police officer until they have definitive evidence one way or the other, LBPD spokeswoman Arantxa Chavarria said.

She said detectives haven’t found anyone else who was wounded by the gunfire. They’re still trying to pinpoint any suspects and determine a motive for the shooting.

“This incident serves as a reminder that we should always remain vigilant,” Luna said in his internal bulletin.

Editor’s note: This story was updated shortly after being published with more details from the bulletin.

Jeremiah Dobruck is managing editor of the Long Beach Post. Reach him at [email protected] or @jeremiahdobruck on Twitter.