HAYWARD — In a dramatic exchange of gunfire that pierced the quiet of Christmas morning — and turned even more mysterious Friday night — a BART police officer was shot in the arm when he and his partner questioned a suspicious man they spotted pushing a U-Haul truck in the Hayward station parking garage.

The second officer shot back, wounding the fleeing man, who was later identified as a probationer with drug and burglary convictions. Both the officer and the suspect survived.

But later on Friday night, police revealed they had made a gruesome discovery in the back of the U-Haul: a dead male body.

Police called homicide detectives and a coroner about 7 p.m. to join the investigation but offered no other details.

The confrontation began about 11:15 a.m., when police say a pair of BART officers saw 27-year-old Charles Goetting near a U-Haul truck with a broken window and what they later determined were swapped-out license plates.

When they caught up with the man walking along Grand Street and asked his name, Goetting answered.

But when they told him to put his hands above his head, without warning, Goetting reached into his waistband, whipped out a stolen gun, fired and ran, BART deputy police chief Jeffrey Jennings said.

Mauricio Palma, 15, heard the gunshots from across Grand Street as he was about to go out with his father to buy batteries for a new drone he”d received for Christmas. When they ran outside, they happened upon the dramatic scene and saw the officer”s final shot at Goetting.

Then they watched as both officers tried to subdue Goetting in the street. As Palma ran forward, he saw the wounded cop struggling to handcuff Goetting, then take a step back and sit down, clutching his arm.

“Quiet!” the other officer yelled at Goetting in a video the boy shot. “You just stop right now!”

When the wounded officer took off his jacket, blood flowed from a bullet hole in his bicep, Palma said. The boy stopped recording and went to help.

“There was a lot of blood. He was kind of woozy,” Palma said. “I told him to put his hand on it and put pressure on it.”

He said he helped the officer to his feet just as a police car raced up to take him to the hospital. In Palma”s video, the other officer, wearing what looked like a leather jacket and jeans, stood over the suspect, who was lying in the street with a handgun a few feet away. The boy said he was so close that he was able to see Goetting had at least two or three bullet wounds — on his hip and on his side.

Both the injured officer and Goetting were taken to Eden Hospital. The officer was treated and released later Friday afternoon. Goetting had surgery and was listed in stable condition.

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. Both were wearing body cameras, Jennings said.

Police said Goetting will be charged with attempted murder. Jennings said police discovered burglary tools and a mask in a backpack in the truck. One of the conditions of his probation was that he must submit to a search by police on demand.

Authorities didn”t reveal until Friday night that they had found an unidentified male body in the back of the U-Haul.

The shooting happened a block from Hayward”s downtown BART station, which remained open on what otherwise was a quiet holiday morning, with traffic picking up later in the afternoon for the Warriors game.

For Palma and his father, the drama was an unexpected chance to help an officer in need.

“Police officers are citizens too, and if you see a citizen in need of help, you stand up and you help him,”” the younger Palma said. “What if he”d been shot in the chest, and no one helped him and he died?”