It started as an attempted traffic stop around 4:30 p.m. at the intersection of Hammon Place and Westminster Boulevard and ended with the fatal shooting.
"During the car stop, the police officers heard a gunshot come from inside the car. They returned gunfire to the car," said Lt. Russell Reinhart of the Huntington Beach Police Department.
Officials said a third suspect who was in the vehicle - a female - is in police custody, facing unknown charges.
Witness Tori Zapalowski was at a nearby friend's house when she heard the gunshots.
"It sounded like 20 gunshots, and when you see that window on that car, it looks like about 20 gunshots," said Zapalowski.
Zapalowski grabbed her cellphone, ran to the scene and captured a video of officers and police canines moving in toward the suspects' vehicle.
"They were waiting to see if the guys would get out. I guess there was no movement. They pulled one guy out on this side and they pulled the other guy on the other side, and they were dead," said Zapalowski.
The two men lay on the ground motionless, but handcuffed.
"As part of the standard police protocol, they're going to handcuff them until the car is finished being searched after an officer-involved shooting," said Reinhart.
Police will not say why two uniformed Huntington Beach officers in a marked patrol car were trying to stop the suspects' vehicle in Westminster, which is outside their city limits, or what type of weapon they recovered from the bullet-riddled car.
They also won't say if the gunshot fired from inside the vehicle was directed at officers.
Witness Bill Weckerly described what he saw after the shooting.
"There was at least a half-a-dozen or more cops behind the marked patrol car with their guns drawn, one with a shield. At that time, I did see another cop come back from the car, and he had a silver-plated or nickel-plated sawed-off shotgun," said Weckerly.
No officers were injured. The investigation was turned over to the Orange County Sheriff's Department.