A Honduran national who had been deported after serving about five years in state prison for manslaughter in connection with a Westbury gang-related killing was held without bail Friday on a charge of illegally re-entering the country, officials said.

Gerson Eli Turcios Maradiaga, 28, of Levittown, had been picked up by Nassau County police on marijuana-possession charges recently and was issued a desk appearance ticket. But he then was detained immediately this week by U.S. Immigration and Customs Enforcement after he was released on the county charges, officials said.

Eastern District U.S. Attorney Richard Donoghue said in a statement: “The message to deported felons is clear — if you are deported from the United States, stay out or the only thing you will be returning to is prison.”

In 2008, Turcios, then 17, was one of five members of the 18th Street gang who were involved in an attack on four people who they mistakenly believed were members of the rival MS-13 gang, officials said. One of the victims was killed and the others were wounded by shots fired by some in the 18th Street gang, police said at the time.

The victims were shot outside the Club La Boom at the Don Juan Mexican Restaurant on Old Country Road in Westbury.

Turcios was originally charged with second-degree murder but pleaded guilty to manslaughter after it was determined he was not one of the shooters, his federal public defender, Randi Chavis, said Friday at a hearing in federal district court in Central Islip.

Chavis said her client has always denied law enforcement assertions that he was an 18th Street gang member, and that several of the people he was with got much lengthier prison sentences.

Sign up for The Classroom newsletter. Education on Long Island is changing. Find out how. By clicking Sign up, you agree to our privacy policy.

Turcios was deported to Honduras in 2012 after serving his sentence, officials said.

Federal Magistrate Arlene Lindsay originally agreed Friday to release Turcios on $50,000 bond backed by several member of his family. But Eastern District prosecutor Catherine Mirabile appealed that ruling to U.S. District Judge Joanna Seybert, who overturned the release. Seybert said it appeared that Turcios had close family ties, but that the other circumstances called for his detention.

Both Chavis and Mirabile declined to comment afterward.

Police said at the time of the 2008 shootings that an associate of the 18th Street gang called gang members saying he had been hassled by MS-13 members at the nightclub. “Once that phone call came out, the 18th Street gang rounded up some of their thugs,” a Nassau detective said at the time. “They drove up to Don Juan restaurant and they waited for some victims to come out.”

The four shooting victims were believed to be MS-13 members because they were wearing blue clothes — a color of MS-13 — and because they were seen “shaking hands with and conversing with” known members of MS-13, a detective said then. The victims were fired on when they got into a car.

“It’s kind of guilt by association, and when they walked out they were targeted and they were followed because of that association," a detective said then.