A street person grabbed a policeman's pistol outside a doughnut shop Friday, chased the officer and gunned him down, then fatally wounded a second officer before other police officers shot the suspect dead, authorities said.

Killed were Officers Gene Simpson, 45, and Gordon Silva, 39. Silva, who had been with the force 17 years, died at San Jose Medical Center about six hours following the shooting and after receiving some 50 pints of blood, said police spokesman Sgt. Bud Davis. Dr. James Hinsdale said Silva was shot in the chest.The gunman, identified late Friday as Dale "Randy" Connors, 35, no known address, was shot through the heart and died of multiple gunshot wounds at 12:26 p.m. on the operating table, Davis said.

Simpson, a 19-year veteran, stopped a man police referred to as a "street person" for questioning just before noon in the parking lot of the downtown doughnut shop, Winchell's. The officer was responding to a call that a man in the area was acting strangely, Police Chief Joseph McNamara said.

"The officer . . . got out of his car and tried to calm the suspect down," McNamara said. "The suspect was extremely belligerent and attacked the officer. During the attack he lost his gun. He tried to get away. He broadcast, `Man with a gun!' and a few seconds later, `He's got my gun!'

"The officer ran behind cars in the parking lot. The suspect chased him and fired. When the officer was down the suspect walked over and shot him in the head," the chief said.

The suspect ran into a nearby intersection with the officer's .357 Magnum and shot Silva as the 17-year veteran was arriving at the scene.

The gunman then shot at other policemen converging on the scene and they returned the fire, killing him, the chief said.

"Other police officers arrived and pumped the guy full of lead," said a witness, Marc Haapoja.

Mike Fletcher said the gunman was an "old friend," and identified him as "Randy."