MARTINEZ — Jury deliberations began Thursday in the trial of two San Pablo men charged with killing a witness in revenge for testimony that helped convict their relative and fellow gang member of a 2003 murder.

Francisco Javier Perez, 20, was leaving his San Pablo home to go to his roofing job Aug. 5 when he was shot dead by three members of a violent, West Contra Costa County street gang, prosecutor Aron DeFerrari said in closing arguments.

On trial are Hung Nguyen and Alberto Alejandre, both 24. A third defendant, Martin Cerda, 20, is being prosecuted separately in a trial scheduled for Aug. 30.

“They did more than kill a man two days before his 21st birthday,” DeFerrari told the jury. “They took a stab, and a good one, at the criminal justice system. Killing a witness is the ultimate crime.”

All three are charged with murder for the benefit of a gang, conspiracy, shooting from a motor vehicle at a pedestrian, and street gang terrorism. They are additionally charged with shooting at a Vallejo woman’s car on the Carquinez Bridge on Aug. 3 two days before Perez’s death.

Perez was a former associate of the defendants in 2006 when he testified against Victor Cerda — Martin Cerda’s older brother and Alejandre’s cousin. Victor Cerda, 24, is now serving a life sentence for shooting to death a rival gang member, 17-year-old Jorge Herrera, at San Pablo’s Davis Park in June 2003.

Alejandre’s older brother, Ramon Alejandre, is also serving life in prison for a gang-related killing.

He shot 15-year-old San Pablo resident Ivan Santos, who was not in a gang, nine times as the teen walked home after buying a soda simply because Santos was wearing red pajama pants. Red is the color claimed by Alejandre’s rival gang.

Perez’s family members, including a grandmother who witnessed his killing, said that he lived in fear for three years, knowing that the gang would exact its revenge.

Knowing that Perez left for work every day at 7 a.m., the defendants waited for him in Alejandre’s minivan and then fired 19 bullets, two of which stuck Perez, DeFerrari said. When they were arrested later that day, Nguyen’s shirt was covered in gunshot residue and the two guns used were found hidden in a lawn mower in Alejandre’s backyard.

Deputy public defender Andrea Zambrana argued that Alejandre frequently loaned out the minivan and was not present either for the Perez shooting or the bridge attack.

Nguyen testified at trial that he was inside the minivan with his co-defendants during both shootings, but had no idea what was going to happen.

His attorney, Patrick Cannon, argued the homicide can’t be attributed to anyone other than Martin Cerda.