A gunman opened fire at a busy hair salon in the Southern California coastal town of Seal Beach on Wednesday in a shooting rampage that left eight people dead and another critically wounded, police said.

The suspect, who was not immediately identified, fled the scene in a vehicle and was arrested moments later about a half mile away, Seal Beach police Sergeant Steve Bowles told reporters nearly two hours after the shooting.

We feel very confident at this point that we do have the single and only suspect in custody, Bowles said. He appeared cooperative and did not resist our officers at all when he was detained.

The daylight shooting marked the first murders in several years and perhaps the deadliest outbreak of gun violence ever in Seal Beach, a quiet Orange County town about 30 miles southeast of Los Angeles, he said.

For the city of Seal Beach, this could be one of our greatest tragedies, Bowles said.

Circumstances of the shooting remained murky, and Bowles said detectives were trying to establish a motive for the violence and any link between the gunman and the establishment, called the Salon Meritage.

Former salon employee Lidia Sosa, who went to the crime scene when she heard the news, told reporters the gunman shot and killed his ex-wife, with whom he was embroiled in a custody dispute. The owner of the shopping center, Henry Morales, said he was told by salon employees that the gunman was the former husband of a hair stylist there.

A long-time customer who identified herself only as Karen said she heard about the shooting and called her stylist, who answered the phone in a state of panic.

He was screaming, and the phone went dead. He was hysterical, she said.

SOME INSIDE SALON ESCAPED UNHARMED

Of the nine people struck by gunfire, six were declared dead at the scene and three others were taken to Long Beach Memorial Hospital with critical injuries, Bowles said. Two of those hospitalized later died of their wounds, he said.

Bowles said he did not know how many of the victims were employees or how many were patrons, but the Los Angeles Times reported that the owner of the Meritage was among the dead, citing the man's niece.

Most of the victims were believed to have been shot inside the salon. One man initially listed as wounded was found in the parking lot, but it was not clear where he was shot, he said.

There are survivors from inside the salon that escaped without harm, Bowles said.

The salon, which was filled with customers at the time of the shooting, is located in a large open-air shopping center on Pacific Coast Highway in Seal Beach. The area around the salon was cordoned off with yellow crime-scene tape, and several nearby streets were blocked off by police.

Cindy Spinosa, who works at the Seal Beach Chiropractic Center across the street from the salon, said she and others were left shaken by the outburst of violence.

It's such a quiet little community. We don't experience things like this, she said.

Overhead television footage broadcast on KCAL9-TV showed a white pickup truck left parked by a roadside with three of its doors open about a half mile from the shooting scene. The station reported that a number of weapons were recovered from the vehicle by police.

Bowles said the type of weapon or weapons used by the gunman was not immediately known.