A Latin King street gang member has been charged with the fatal shooting of a popular C.W. Post basketball player 12 years ago in a drive-by murder committed because the victim was mistaken for someone who had attacked a Latin King leader, federal officials said Monday.

The alleged killer, Jaime Rivera, 32, of Freeport — who is from a family of police officers — was arrested late Saturday after eluding for three days what a federal prosecutor described as “an army of law enforcement officials” hunting him for the slaying of Tafare Berryman.

As Berryman’s mother, Dawn Thompson watched with tears in her eyes, Rivera was arraigned in federal court in Central Islip, charged with murder in aid of racketeering and use of a firearm in a murder, officials said.

Rivera, who prosecutors described as a heroin addict, was held without bail as a danger to the community and a flight risk. He did not enter a plea.

In court Monday, Thompson hugged the lead detective in the case, James Carroll, saying, “Thank you very much. Thank You.”

If convicted, Rivera faces mandatory life in prison or the death penalty, officials said. His attorney, federal public defender Randi Chavis, declined to comment after the hearing, as did Eastern District prosecutor Lara Treinis Gaz.

advertisement | advertise on newsday

The killing of 22-year-old Berryman, of Brooklyn, in April 2005, had been unsolved for more than a decade despite the offering of a $10,000 reward and being featured in 2006 on “America’s Most Wanted.”

The investigation confirmed the initial police theory at the time that Berryman was shot to death by Rivera because he mistakenly thought Berryman and a friend had been involved in an attack on a leader of the Latin Kings at La Mansion nightclub in Long Beach, officials said.

Jaime Rivera, 32, of Freeport, was secretly arrested late Saturday, Feb. 4, 2017, and charged in the 2005 fatal shooting of C.W. Post basketball player Tafare Berryman, officials said. Photo Credit: Jaime Rivera, 32, of Freeport, was secretly arrested late Saturday, Feb. 4, 2017, and charged in the 2005 fatal shooting of C.W. Post basketball player Tafare Berryman, officials said.

The club was the site that night for a party attended by several hundred C.W. Post students there for an annual campus fashion show. The club had recently become a hangout for Latin Kings.

Rivera believed he was avenging the attack and bolstering his status as a Latin King by shooting Berryman, according to court papers and sources.

Berryman’s friend, Aaron Daly-Frith, was hit in the head during the melee with a bottle. But neither Berryman nor Daly-Frith, also a Post basketball player, were involved in the brawl, officials said.

About a mile away in Oceanside, Berryman took the wheel because Daly-Frith’s vision was obscured by blood, police said then and officials confirmed Monday. Rivera fired the fatal shot from a car that pulled alongside the stopped car.

Then-Nassau Homicide Squad Chief Dennis Farrell had said he thought it was “a case of being in the wrong place at the wrong time . . . [Berryman] wasn’t even drinking. He was there to dance.”

Nassau police had turned to the Drug Enforcement Administration and the FBI for help in cracking the case, officials said.

advertisement | advertise on newsday

The solving of the cold case turned on federal authorities pressuring Latin King members and others being investigated for heroin dealing and violent crimes to give up information on the killing, sources said.

“By joining forces . . . we identified and arrested the person allegedly responsible for murdering Tafare Berryman,” said James Hunt, head of the DEA’s New York office said in a statement.

It also took the persistent efforts of Thompson, of Brooklyn, who called police every three months and also recruited help from her Brooklyn assemblyman, sources said.

Treinis Gatz said in court papers that “The government’s evidence against the defendant is overwhelming,” and includes testimony from eyewitness, cooperating witnesses and former gang members, and “admissions made by the defendant to multiple individuals.”

Treinis Gatz argued that Rivera should be held without bail because he had evaded authorities for three days, refused requests by family members, a probation officer and his attorney to surrender, and collected money from associates to help flee. She said that Rivera even “made arrangements for the care of his dog.” Sources said it was a pit bull.

advertisement | advertise on newsday

When investigators came to Thompson’s home late Saturday to tell her of the arrest: “You didn’t want to hear my scream. I’m the happiest woman in the world,” she recalled in an interview.

“My son never left this house,” Thompson said of the place in her house where she had placed photos, Berryman’s jersey and other mementos. “I never gave up.”

Rivera comes from a law enforcement family, Treinis Gatz said, including a mother who is a retired New York police officer, a step-father on the NYPD, and a brother who is a Freeport police officer.

Eastern District United States Attorney Robert Capers, said in a statement: “This case should serve as a message to all gang members, if you engage in violent gang activity, our law enforcement partners will not stop pursuing you until you are held accountable.”

The 6-foot-6, 220-pound Berryman was a star basketball player at Tilden High School near his East Flatbush home at age 17.

Tom Galeazzi, coach of the Post men’s basketball team, said then of Berryman, “He’s just a very first-class kid ... People gravitated to him because he had such an infectious smile. He was just an upbeat kid, and every day was a great day for him.”