A gunman in search of his estranged wife killed her cousin and a police sergeant in Martinez on Saturday morning before officers fatally shot the suspect, according to authorities as well as friends and relatives of the dead.

A shaken Martinez police chief announced that Sgt. Paul Starzyk, a 12-year veteran of the force, was shot to death after he responded to a domestic violence call at Elegant Hair Design, a beauty salon on Pacheco Boulevard, near Morello Avenue and across the street from the Shell Martinez Refinery.

He leaves behind a wife, who is a deputy sheriff with Contra Costa County, and three young children.

Starzyk, a 47-year-old Antioch resident, was airlifted by helicopter to John Muir Medical Center in Walnut Creek but did not survive his life-threatening injuries, said Police Chief Tom Simonetti.

"As a department and a community, we are devastated by this tragedy," Simonetti said. "We are a department in mourning."

According to police and witnesses, Jose Felix Sandoval, the suspected gunman, arrived at the shop with a gun, broke a window and said he was looking for his wife, Margarita Sandoval, the owner of the salon. He was told she wasn't there, and patrons and workers began to flee.

Stephen Boutte said he was driving by the shop when he witnessed the suspect smash the plate-glass window. Boutte said he got out of his van, confronted the suspect and asked him what was going on.

"He kept telling me everything was OK, but people inside the shop were screaming at me to call 911," he said.

Boutte said the suspect calmly walked around to the back of the business, and it was there, outside the salon, that gunfire erupted.

Sandoval shot and killed a woman, identified by friends and relatives as Catalina Torres, a 44-year-old mother of two. Torres was a part-time worker at the salon and a cousin of Margarita Sandoval, friends and relatives said.

Sandoval also killed Starzyk at the apartment complex behind the salon, police said. Authorities could not say whether the officer or the woman was shot first. Responding officers then opened fire on the gunman.

According to Contra Costa County Superior Court records, Margarita Sandoval asked for a restraining order against her husband on July 9, 2007, alleging that she had been the victim of domestic violence.

A month later, on Aug. 7, 2007, Margarita Sandoval petitioned to divorce her husband. Records show the couple had children.

The request for a restraining order was granted on Aug. 27, 2007, and was to extend for three years, records show.

The couple were scheduled to return to court on Oct. 27 for a settlement conference in connection with their divorce next month.

Starzyk was the first police officer killed in the line of duty in Martinez since 1973.

"Martinez is a town of 40,000, a very quiet city," said Mayor Rob Schroder. "Our biggest problem is graffiti. We rarely have a murder, let alone an officer killed."

Starzyk was promoted to sergeant last year and had been serving as a training officer. He also worked with the Contra Costa County NarcoticEnforcement Team. His three children were ages 6 and younger, Schroder said.

"This is a tragic loss for the city of Martinez," the mayor said. "Sgt. Starzyk had all the qualities you'd want in a police officer."

In a story that ran in the Contra Costa Times last month on new police recruits, Starzyk was quoted talking about the life of a police officer.

"I like to say, 'It's a front-row seat at life,' " he told the newspaper. "You have to have a calling to community service. Once you get the job you feel you know you couldn't do anything else."

Martinez Councilman Mark Ross, who knew Starzyk, said the officer died a hero.

"He arrived at a very dangerous scene and intervened to try to protect one of our citizens," Ross said. "We lost one of our finest."

Martinez Police Cmdr. Gary Peterson said the loss will be tough on the close-knit department. "It's not going to be easy. ... We're devastated."

Silvia Torres-Limon rushed to the scene in search of her sister when she heard the news.

"I don't know where she is. I can't find her," she wailed into her cell phone.

Others tried to console her, telling her to think positive thoughts, that her sister escaped uninjured. Later she learned her sister was dead, according to friends and relatives. Authorities, however, would not confirm whether Catalina Torres was one of the gunman's victims.

Marco Nunez, a friend of Torres, said she recently helped his family cope with his sister's battle against cancer.

"She's really been a blessing to our family," he said.

Nunez said that while he doesn't know exactly how the tragic shooting unfolded, he believes Torres was trying to protect her cousin. He called Jose Felix Sandoval "a coward."

Margarita Sandoval, who was not injured, was spotted at the scene later.

Authorities blocked off the intersection near the hair salon with yellow tape. Police from Martinez, Pleasant Hill and Concord were joined by Contra Costa County sheriff's deputies, California Highway Patrol officers and Contra Costa County firefighters on the scene.

Also on the scene were representatives of the Contra Costa County district attorney's office, which investigates any officer-involved shooting.

The store's customers were taken to the sheriff's office in Martinez to be interviewed, Lee said.

Schroder said officials called in grief counselors to City Hall - next to police headquarters - where about 50 people had gathered Saturday afternoon. Many police officers were among them.