The suspect, whose name was not released, was spotted beating another man in his late 50s at a restaurant near the intersection of Huntwood Avenue and Tennyson Road at about 9:30 p.m., police said.
Witnesses saw the man severely injure the victim, who appeared to be intoxicated. The suspect then calmly walked into the restaurant, got two pizzas, got into his car and drove off, according to police.
A responding officer saw the suspect drive into the parking lot of an apartment complex in the 25000 block of Cypress Avenue. Before the officer could get out of his car, the suspect fired two rounds at the officer and ran away, police said.
The officer didn't fire back because his police car was carrying the suspect's girlfriend and three children, who were all under age eight, according to police.
A spokesperson was not immediately available to comment about why the suspect's girlfriend and children were involved in the police pursuit. A massive search led to officers finding the man in a nearby home of the suspect's friend, police said.
Police negotiated with the suspect to come out for more than an hour. The suspect then tried to take his own life and shot himself in the head, according to police.
The suspect was taken to a local trauma center, where he remains in critical condition as of 1 p.m., according to police and the Alameda County coroner's bureau.
The victim who was beaten was also taken to a trauma center, where he was listed in stable condition. An update on his condition was not immediately available.
Anyone with information on this series of events is encouraged to contact Inspector Rob Lampkin at (510) 293-7079.