Corrections officers unshackle Carlos Rojas, left, and Randy Brewer Jr. at their trial June 2 in Yakima County Superior Court. The two were sentenced Friday.

Two men accused of killing a former Sureño gang member outside a South Sixth Street market four years ago were sentenced to prison on lesser charges Friday.

Yakima County Superior Court Judge Kevin Naught sentenced Carlos Rojas, 29, and Randy Brewer Jr., 31, to 8 ½ years in prison each after they pleaded guilty to, respectively, first-degree rendering criminal assistance and first-degree manslaughter.

They will receive credit for time served in the Yakima County jail while awaiting trial for four years, prosecutors said.

Both men were initially charged with first-degree murder in the shooting death of David Amezcua outside the Mercado Latino II May 23, 2015. Prosecutors alleged that Rojas was the shooter, while Brewer drove Rojas to and from the scene.

The men, both Norteño gang members, targeted Amezcua because of the Sureño tattoos on his arms, prosecutors said in court documents.

Prosecutors offered the men plea deals several days into the trial because of issues identifying the men as suspects. While detectives were able to link Brewer to the crime by cellphone records and a partial license plate number, and video put Brewer and Rojas together shortly before the shooting, witnesses at the scene could not definitely say the men were there, as some of their memories had faded too much since the incident.

“The ultimate result is not favorable to the victim’s family. It is not something that we as law enforcement are pleased with as an ultimate result,” Yakima County Prosecuting Attorney Joe Brusic said in an earlier interview about the plea agreement. “The public needs to understand that when we are in trial, trials are dynamic, and evidence is fluid.”

Reach Donald W. Meyers at dmeyers@yakimaherald.com or on Twitter: donaldwmeyers, or https://www.facebook.com/donaldwmeyersjournalist.