RELATED: Martinez standoff ends, murder suspect identified
Police say the suspect, armed with a gun, was high on drugs as they tried to get him out of the car.
Police finally got the suspect out by shooting a gas round into the man's vehicle.
The shooting happened around 1:30 p.m. Thursday.
"I heard what sounded to me like a backfire because we're around a park, a church," said witness Kelisha Abad.
Gregory Prokopowicz, 38, ran from First Avenue in Walnut Creek, where his neighbors saw him cut through an empty parking lot trying to get home.
"And then I guess neighbor asked, 'Hey, what's going on,' and he said, 'Oh, hi I'm trying to get to safety -- from my crazy ex-wife,'" said neighbor Mei Xing.
RELATED: Walnut Creek homicide suspect in standoff with police in Martinez
The victim is 47-year-old Roselyn Policarpio.
"We believe they had a dating relationship and I'm not sure if it was actively going on now or if this was actively going on now or if this was a past dating relationship," said Lt. Tom Cashion of the Walnut Creek Police Department.
Policarpio's LinkedIn profile appears to have been altered as it calls her a "cheating whore."
A representative for McAffee confirms she worked there in the past and workers recall her fondly.
Police say Prokopowizc was armed with a gun and knives when he was arrested.
"We're here to preserve everybody's life no matter what they do and we want to get him into custody with no one injured or hurt," Cashon added.
RELATED: Police say woman shot and killed in Walnut Creek
Prokopowizc was taken to a hospital for treatment before being booked in jail.