ANDERSON (AP) — Two men have pleaded guilty to shooting and killing a man at an Anderson apartment last year.

Twenty-year-old Jason Sanford and 22-year-old Lorenzo Sullivan pleaded guilty Tuesday in the death of Rashaun Williams.

Circuit Judge Cordell Maddox sentenced each man to 30 years in prison, giving them credit for the 18 months they’ve been in jail.

Prosecutors said the men waited behind a building until the 24-year-old Williams came by on a motorcycle in May of last year. Prosecutor Jenn Byford said the men sprayed bullets at Williams, with one bullet striking him in the chest.

Williams died in surgery at an Anderson hospital a few hours later.

Sanford said the shooting occurred after an altercation between his family and Williams’ family. Sullivan said he never meant to shoot Williams.