A man suspected of fatally shooting a woman outside an apartment complex in Carlsbad and stealing her SUV late Friday died early Saturday in a shootout with police in front of an In-N-Out Burger in Orange County.

Video taken at the restaurant on Avenida de La Carlota in Laguna Hills shows people inside running for cover. Patrons outside crouched under tables as gunshots rang out from the suspect and officers exchanging fire around 1 a.m.

One video briefly shows a man with short, dark hair and a red shirt running from the vehicle in the middle of the street toward the restaurant, with his hands apparently pointing toward the officers.

The Orange County Sheriff’s Department identified the dead man as Andre Anthony Matijasevic, 31, of Rancho Santa Margarita, a community in south Orange County. It’s not known what, if any, relationship Matijasevic had with the woman who was shot in Carlsbad, Sgt. Gerard McCann said.

McCann would not comment on how many officers were involved in the shooting or how many rounds were fired. A semiautomatic handgun with a wrapped grip and attached flashlight was found near Matijasevic, McCann said.

The SUV Matijasevic was driving became disabled in the middle of the road in front of the In-N-Out, McCann said. Matijasevic jumped out of the car and was running toward the restaurant when he was shot, but McCann said there did not appear to be any connection to the restaurant.

“It just happened to be where he decided to make his stand,” McCann said. “ …There are bullet holes in the windows of the police cars, so we know he shot at us.”

McCann said it will take time for investigators to determine how many shots were fired and who fired them.

The situation began around 9:53 p.m. Friday in Carlsbad when police responded to a report of gunfire in the parking lot of an apartment complex in the 2300 block of Rising Glen Way. When officers arrived, they found a woman with multiple gunshot wounds. Paramedics pronounced her dead at the scene, according to Carlsbad police.

The woman’s maroon Kia Sorento had been stolen, and the department sent the license plate number to surrounding jurisdictions, police said.

At 12:18 a.m., the Laguna Beach Police Department “received notification from a license plate reader at El Toro Road and Laguna Canyon Road that the vehicle was entering their city,” according to a sheriff’s department news release.

About 37 minutes later, officers in Newport Beach spotted the stolen vehicle near Newport Coast Drive and Pacific Coast Highway. The person driving did not stop when officers tried to pull the car over, and during the ensuing pursuit, an Irvine Police Department K-9 unit joined the chase, authorities said.

The pursuit continued to the southbound 5 Freeway, according to the sheriff’s news release, where the driver exited at El Toro Road, drove through a business complex and headed north on El Toro Road.

Police said the driver stopped the car in the middle of El Toro Road, just south of Avenida De La Carlota, got out of the vehicle and started firing at approaching police cars.

The suspect was taken to Providence Mission Hospital in Mission Viejo, where he was pronounced dead, McCann said.