MARTINEZ — The murder trial of two West Contra Costa men began Monday with the prosecutor claiming the defendants robbed and shot their victim “for no other reason than because they could,” and the defense attorneys pointing accusatory fingers at each other’s client.

Joseph Ellis, 29, of Richmond, and Kenneth Byrd, 24, of San Pablo, are accused of robbing and shooting Jaihro Lopez near the Contra Costa College campus in San Pablo around 2 a.m. on March 13, 2012. Ellis is charged with murder, second-degree robbery and being a felon in possession of a firearm, plus enhancements. Byrd is charged with murder with a firearm enhancement and second-degree robbery.

“There is only one reasonable conclusion based on the overwhelming evidence,” said deputy district attorney Simon O’Connell, who presented similar yet separate opening statements to two juries — one for each defendant. Once witnesses were called, the two juries shared the courtroom, with one in the jury box and the other seated in the gallery.

Dual juries are being used because certain evidence that is admissible against one defendant is not admissible against the other.

O’Connell said Lopez was visiting a friend who lives in an apartment across the street from the community college when he decided to walk to a liquor store to buy a bottle of gin. The store was closed, O’Connell said, so Lopez headed for a convenience store to buy snacks.

Before he got to the second store, the prosecutor said, he encountered Ellis and Byrd. He was robbed of cash and his cellphone and was shot once in the chest. The 28-year-old San Pablo man died at the scene. Both suspects were apprehended on campus within minutes.

Linda Fullerton, representing Ellis, told her client’s jury that he “is not the ideal person. But he did not kill or rob Mr. Lopez.”

Fullerton said Ellis and Byrd acquired a .38 caliber handgun and a sawed-off rifle the night of the killing after a series of threatening text messages sent to Byrd’s girlfriend by an acquaintance who had scuffled with Byrd earlier in the day.

“What is not in dispute is that a bullet from a .38 killed Mr. Lopez,” she said. “They ran from the scene. Mr. Ellis chucked the guns.”

She said an expert in gunshot residue would prove “Mr. Ellis is not the one who pulled that trigger.”

Betty Barker, representing Byrd, told her client’s jury that it was Ellis who came to Byrd the night of the murder and said, “Let’s go rob somebody.”

When Byrd asked why, Barker said Ellis replied, “For the hell of it.”

“There will be no doubt that Joseph Ellis committed that robbery and pulled that trigger,” Barker said.

Walton, the trial’s first witness, testified that he gave Lopez a $5 bill and his house keys before his friend of 20 years left for the liquor store. He said Lopez called him to tell him the store was closed, and that he told Lopez to return to the apartment.