At 11:11 a.m., an officer noticed a man acting suspiciously in the BART station parking structure.
As the officers were attempting to identify the man, he fled and shot at the officers as he ran.
When the officer went to search the suspect, the suspect resisted and reached for his waistband. The wounded officer was escorted to a medical center by a police cruiser, and Goetting was air-flown to Eden Medical Center in Castro Valley for surgery after being given CPR by Hayward emergency responders.
Mauricio Palma, 15, who had just opened a new drone for Christmas, said he and his father ran out when they heard gunshots and saw two officers struggling to handcuff a man.
Then they watched as both officers tried to subdue Goetting in the street.
According to ABC 7 reporter Melanie Woodrow, Goetting used a stolen gun in the shooting, and the U-Haul van appeared stolen as well.
The officer suffered injuries not considered life-threatening and has since been released from the hospital, police said.
BART did not identify the officers, but said the one who was shot had about five years experience, and his partner had been on the force about 10 years.
Police said Goetting will be charged with attempted murder.
The body was discovered as investigators were conducting a forensic analysis of the suspect vehicle, police said.
The incident occurred out on the street next to the garage, on Grand Street in downtown Hayward.