Two reputed MS-13 gangbangers convicted of killing a 39-year-old man in Nassau County who they mistakenly believed to be part of a rival gang were hit with potential life sentences.

On Tuesday, a Nassau County judge gave both Carlos Flores, 26, and Pedro Rivera, 25, prison sentences of 50 years to life for the cold-blooded killing of Nelson Rodriguez of Hempstead on March 20, 2017, as he walked home from his job at an auto body shop.

Flores and Rivera drove from Hempstead to hunt for a member of the rival 14th Street gang in retaliation for an assault on an MS-13 member, according to the Nassau County District Attorney’s office,

The pair spotted Rodriguez walking on Front Street and, though he was not a member of the 14th Street gang, Flores told Rivera to kill Rodriguez.

Rivera exited their vehicle walked past Rodriguez in the opposite direction. The gangbanger then turned around, shot Rodriguez and in the head and, after Rodriguez fell to the ground, Rivera pumped another round in his back.

Rivera was arrested in July 2017 and Flores was collared in October 2018. In August, both men were convicted of second-degree murder, first-degree conspiracy and two counts of criminal possession of a weapon.

“These MS-13 members murdered an innocent man in cold blood to settle a perceived gang score, and they will spend the rest of their lives in prison for this depraved crime,” Nassau DA Madeline Singas said in the news release.

Attorneys for Rivera and Flores did not immediately respond to requests for comment.