ATTLEBORO, Mass. – Two men authorities say were in a car with former New England tight end Aaron Hernandez before one of his friends was shot to death were in custody Friday, one charged with illegally carrying a gun and the other accused of being an accessory after murder.

Prosecutors, who this week charged Hernandez with murder, haven’t said who fired the shots that killed his friend Odin Lloyd, a Boston semipro football player.

Carlos Ortiz, who was arrested in Connecticut but was transferred to Massachusetts to face the gun charge, and Ernest Wallace, who walked into a South Florida police station to surrender, were identified earlier as being with Hernandez and Lloyd the night of his shooting death, a prosecutor said.

Ortiz was charged with carrying an unlicensed firearm in North Attleborough on June 17, the day Lloyd was found shot to death near Hernandez’s home there. Details of the charge weren’t released.

Wallace, whose wanted poster was released Thursday night, surrendered in Miramar, Fla., police said. Authorities had been seeking Wallace on a charge of acting as an accessory after Lloyd’s murder. Details of that allegation also weren’t released.

Police arrested Hernandez on Wednesday at his home and charged him with orchestrating Lloyd’s execution-style shooting. Prosecutors said Hernandez orchestrated the killing because Lloyd talked to the wrong people at a nightclub.

Hernandez, Ortiz and Wallace were in a Nissan Altima with Lloyd shortly before his death, Bristol County, Mass., District Attorney C. Samuel Sutter said.

Note

• The New England Patriots are offering a new jersey to all fans who want to get rid of the one they bought with Hernandez’s name on it. The team has released him and taken all Hernandez jerseys off the shelf at its store at Gillette Stadium.

Team officials said fans can come to their store at the stadium on the weekend of July 6-7 for a free jersey of comparable value.