Convicted on a federal hostage-taking charge, Luis Gerardo Betancourt faces life in prison.

Betancourt, though, may never spend a day behind bars — thanks to a bureaucratic blunder by the federal government, which “inadvertently” released him before trial.

“They released him by mistake because they thought the case had been dismissed,” said attorney Richard R. Alamia of Edinburg, who represents Betancourt.

The case against Betancourt started in November 2015, when a Mexican woman living in Florida paid smugglers to sneak her best friend and 8-year-old daughter across the border.

After arriving in Reynosa, smugglers took the girl and her mother’s friend hostage.

They demanded $24,000 and asked the mother “if she wanted to hear her daughter scream,” according to the criminal complaint against Betancourt. At trial, the mother testified about how they threatened to cut off her daughter’s fingers and ears.

The mother frantically wired money to the smugglers, asking friends and relatives for help. She eventually sent about $17,500.

When the smugglers didn’t release her daughter, the woman contacted the Orange County Sheriff’s Office. Investigators requested help from the FBI, which tracked the smugglers with cell phone location data.

Information provided by Metro PCS allowed FBI agents to track down Betancourt, 20, of Pharr. Prosecutors said he recruited people for the kidnapping scheme and collected the ransom money.

Investigators also arrested Jonathan Carlos Valdez-Harris and Luis Enrique Perez-Talavera, who pleaded guilty to hostage taking last year. Betancourt rejected the plea deal.

The U.S. Marshals Service transferred Betancourt to the Starr County jail, where he would await trial.

Prosecutors eventually decided to drop five of the seven charges against Betancourt and filed the motion on March 6 — the day before jury selection.

U.S. District Judge Randy Crane granted the motion on March 9, dismissing two drug charges and three charges of lying to FBI agents. Two charges remained: hostage taking and conspiracy to transport aliens within the United States.

What, exactly, happened next remains unclear.

Someone apparently thought all charges against Betancourt had been dismissed and sent the Starr County jail a standard Marshals Service document called a “Prisoner Remand or Order to Deliver and Receipt for U.S. Prisoners.”

Jailers released Betancourt on March 10, according to Starr County Sheriff’s Office records.

Betancourt thought prosecutors had dropped the case and called his attorney, Alamia, to thank him. Alamia told Betancourt two charges remained pending.

“He wasn’t very happy about that,” Alamia said.

Neither the Starr County Sheriff’s Office nor the Marshals Service would comment on the circumstances surrounding Betancourt’s release.

Betancourt never attended another court hearing.

When the judge asked about Betancourt’s whereabouts, FBI Special Agent Lynette Linn and Deputy U.S. Marshal Juan Lara testified he probably fled to Mexico. Investigators believe Betancourt may be affiliated with the Gulf Cartel.

“No one knows,” Alamia said. “I don’t know where he is. His mother doesn’t know where he is. The marshals don’t know where he is.”

Assistant U.S. Attorney James Sturgis confirmed the “inadvertent release” and said Starr County wasn’t to blame.

“There’s an ongoing investigation,” said Sturgis, the attorney in charge of the McAllen Division of the U.S. Attorney’s Office for the Southern District of Texas.

The case against Betancourt went forward without him on March 24.

Prosecutors called 19 witnesses over five days, according to court records. The jury took fewer than three hours Thursday to convict Betancourt on both charges.

Sentencing is scheduled for June. Betancourt remains a fugitive.

The U.S. Marshals Service asks anyone with information about Betancourt to call (956) 618-8025.