A man testified Friday that he was involved in a confrontation with two off-duty federal officers outside a north Modesto bar, moments before one of the officers was fatally wounded by gunfire.

Andrew Diaz said he was getting up off the ground when he heard the gunfire. He stood and discovered that his brother, Billy Diaz, had been shot in the arm.

“He’s just in a lot of pain, from what I remember,” Andrew Diaz testified about his brother’s gunshot wound.

Off-duty federal officers Robert Anthony Moreno and Daryl Chargualaf were involved in the confrontation with the Diaz brothers July 22 outside O’Malley’s Bar in a shopping center at Standiford Avenue and Prescott Road.

Never miss a local story.

Sign up today for unlimited digital access to our website, apps, the digital newspaper and more.

Authorities say Moreno fired a gun, inadvertently killing his co-worker. Moreno has been charged with murder in Chargualaf’s death, along with two counts each of attempted murder and assault with a semiautomatic gun.

The dispute between the Diaz brothers and the federal officers started inside the bar. Andrew Diaz said he accidentally bumped into the officers’ table. He didn’t know who Moreno and Chargualaf were at the time.

Diaz said he turned and apologized three times, but it appeared that Chargualaf didn’t want to accept his apology. The bar owner spotted the dispute and told the Diaz brothers and the federal officers to leave.

Billy Diaz flipped off the owner as a bouncer ushered them out of the bar. Andrew Diaz said he and his brother then left without further commotion. The bouncer has testified that the Diaz brothers cursed at the bar owner as they left, and that one of them made threatening comments toward the bouncer.

The Diaz brothers walked to their car in the parking lot, Andrew Diaz said, while the federal officers walked on the sidewalk, almost parallel to the brothers. He said the two groups then came together in the parking lot, shortly before Andrew Diaz and Chargualaf clashed.

“From what I remember, we both just started throwing punches,” Andrew Diaz said about himself and Chargualaf.

He said they both went to the ground. He doesn’t remember who was in a dominant position or whether they were throwing punches while on the ground.

“It was more of a wrestling match, from what I remember,” Andrew Diaz testified.

He said he and Chargualaf were both trying to get up off the ground when the shots rang out.

During cross-examination, Andrew Diaz said he never saw Moreno point the gun at anyone or fire the gun. Billy Diaz ran east through the parking lot, away from Moreno, and Andrew followed. Moreno returned to the area outside the bar, fearing his girlfriend was in danger.

He found her sitting on the ground next to Chargualaf, who other witnesses said was suffering from a gunshot wound to his neck

Andrew Diaz then started fighting with Moreno.

“I rush (Moreno), because he shot my brother,” Diaz testified.

Moreno, at that point, identified himself as an off-duty police officer. But Andrew Diaz said he continued to beat Moreno.

“I probably had a lot of anger in me. My brother had just been shot,” he testified.

Billy Diaz also returned and joined his brother’s fight with Moreno, throwing punches with his uninjured arm. Andrew Diaz said someone in the gathering crowd swung a beer bottle at him, so the fight ended.

The bouncer who had escorted the four men out of the bar has testified that he was trying to stop Chargualaf’s bleeding when Andrew Diaz kicked Chargualaf’s face.

Andrew Diaz testified that he doesn’t remember kicking Chargualaf in the face. He said it might have happened, but he didn’t remember doing it. He also said he saw Chargualaf sitting on the ground but didn’t know the officer was seriously injured.

He testified on the witness stand that he’d had about five or six drinks – Jack Daniel’s whiskey and Coke – during about three hours at the bar. He said he was buzzed but not drunk.

John Garcia, Moreno’s defense attorney, questioned Andrew Diaz’s credibility as a witness. He asked about discrepancies between the witness’ initial statements to police and the version of events he gave an investigator about a month after the shooting.

Andrew Diaz said he was having a hard time distinguishing the facts from what he thought happened that night, and he was having trouble putting the events in chronological order. He was initially questioned by police the night of the shooting. He said it had been a very long night and he had been drinking alcohol.

Garcia pointed out that Andrew Diaz initially told police all four men were involved in a fight, but his testimony Friday indicated he couldn’t see what his brother and Moreno were doing while he and Chargualaf were fighting.

Andrew Diaz also testified that he didn’t remember telling police that Moreno at one point said, “We don’t want any problems.”

When Garcia asked him whether he was telling the truth then or telling the truth now, Andrew Diaz said, “I’m telling you exactly what happened.”

Testimony in the preliminary hearing will continue Thursday in Stanislaus County Superior Court. At the conclusion, the judge will determine whether there is enough evidence for the defendant to stand trial.