Shortly after a Wells Fargo Bank branch opened at a Pinole shopping plaza, two men with guns approached a Loomis truck parked outside and were confronted by an armed guard, police said.

A shootout ensued after she attempted to stop the men, during which the guard and one of the suspects were injured, Pinole Police Chief John Hardester said.

Two police officers arrived shortly thereafter and encountered the second suspect, who then exchanged fire with the officers, Hardester said. The second suspect and one of the arriving officers were both hit during the shootout.

The suspect tried to run away with a bag of money, but was shot and killed in the middle of a busy street.

“I looked up and saw a guy running through the intersection with a bag in his hand,” said Darius Johnson, a witness who saw the events unfold as he drove into the shopping center’s parking lot. “I heard a couple of shots and saw him fall.”

The officer who fatally shot the fleeing suspect had been hit in the shoulder.

The first suspect got away in the chaos, but was later arrested after turning up at a hospital in nearby San Pablo, police said.

Police are investigating the incident as they try to determine whether the wounded officer, an Air Force veteran who has been with the Pinole Police Department for two years, was shot by the suspect or another officer.

All of the wounded are expected to survive, Hardester said. The names of those involved have not been released.