Myron Haughton and Tatiana Barrow are shown in a family photo.

When Myron Haughton was picked up by authorities, he was an illegal immigrant with three felony convictions. Yet the Maryland resident convinced an immigration judge last year that he was a changed man, a husband and father who should be granted permanent residency, not be deported.

So why is he still behind bars?

That question places­ Haughton, of Silver Spring, in the thick of a debate playing out in courts across the country. He and more than 1,000 other immigrants in similar circum­stances say they should have a chance to return to their homes and families while fighting deportation.

The government — which is appealing the immigration judge’s ruling in Haughton’s case — firmly disagrees that he or any of the others deserves a bond hearing.

Recently, a U.S. district judge in Virginia sided with Haughton, 29, saying that his detention, already lasting more than a year, had become unreasonable and that he deserved a bond hearing. Although she was the first judge in Virginia to take that position in such a case, six of the nation’s federal appeals courts have ­issued similar rulings.

The broader controversy could be resolved this term by the Supreme Court, which is scheduled to consider the case of California inmates contesting prolonged detention in such instances. A decision, assuming the high court can put together a majority, is eagerly awaited.

According to the American Civil Liberties Union, the cases­ of about 4,500 detainees nationwide have been pending for more than six months. The ACLU estimates that 5,000 to 10,000 immigrants are being held because of criminal histories. Many of them, like Haughton, face consequences that they and their supporters consider disproportionate to their transgressions.

“Myron Haughton is as American as any other American,” his attorney, Alfred Robertson, said. “He deserves to be with his family. Although he’s made mistakes in the past, he’s already paid for those mistakes.”

Haughton’s childhood was marked by trauma. He was abused by his stepmother in Jamaica, according to court records, and by his mother after he came to Maryland, illegally, at the age of 11. When a teacher noticed his bruises, he was sent to live with an aunt. But two years later, the aunt returned him to his mother, and the abuse resumed.

At 16, Haughton ran away from home and began living on the streets of Silver Spring with a group of petty criminals who broke into cars and unoccupied homes. Haughton was arrested after a break-in committed soon after his 18th birthday. He briefly escaped juvenile detention by stealing a teacher’s car keys and driving through a fence; then he pleaded guilty in 2006 to burglary and theft.

Haughton served 18 months of a five-year prison sentence and then was released on probation. He soon met Tatiana Barrow. She was raised in a Russian orphanage after being removed from her parents’ home because of neglect, and she was adopted by U.S. citizens at age 15.

Barrow and Haughton have two children — Adelina and Ayden, now 6 and 4. Haughton took care of the children and worked odd jobs, limited by his lack of legal status. Court records show that he received traffic tickets over the years for driving without a valid license.

It was one such incident that sparked his current troubles. In December 2013, he was arrested in Virginia’s Prince William County and charged with driving without a valid license. When Immigration and Customs Enforcement (ICE) learned that he was in the country illegally, he was transferred to federal custody and slated for deportation.

Haughton was detained in the Arlington County jail until September 2014 as immigration officials struggled to put together the documents they needed to send him back to Jamaica. During that time, Barrow and Haughton were married. He was released under supervision for a year, until the paperwork was in order, and then he was taken back into custody in rural Farmville, Va. From jail, he applied for permanent residency through his wife, a U.S. citizen.

Barrow told an immigration court that because of the cost of day care, she had been living “paycheck to paycheck” since her husband’s incarceration and had fallen months behind on her rent. She also said the separation caused the family emotional strain.

“Because we grew up — he grew up with abuse, I grew up in an orphanage — . . . we don’t want this for our kids,” she told the court.

In May, an immigration judge agreed that separating the family would cause “exceptional and extremely unusual hardship” and granted Haughton permanent residency. The government appealed the decision. Haughton remained in custody but has asked a federal court for a bond hearing.

The Supreme Court ruled in 2003 that mandatory detention of noncitizens with certain criminal records is constitutional for “the brief period necessary for their removal proceedings.” At issue now is whether the many months that immigrants are spending in detention centers meet that standard.

The government argues that Congress chose to make detention mandatory and that delays caused by a detainee’s appeals should not be used to justify the detainee’s release.

“It is a statistical certainty . . . that some of those criminal aliens will abscond and that some will commit further crimes that detention would have prevented,” Solicitor General Donald B. Verrilli Jr. wrote in his brief to the Supreme Court.

A study by Syracuse University found that 14 percent of immigration detainees released on bond failed to return to court during fiscal 2015.

Advocates argue that the cases­ that last the longest are those in which the immigrant in question has the best chance of winning permanent residency — and thus is probably least deserving of indefinite detention.

“A large percentage are lawful green-card holders who committed a crime that ICE thinks might make them deportable,” said César Cuauhtémoc García Hernández, a professor at the University of Denver’s Sturm College of Law. “These are people who are fully incorporated into U.S. society. . . . It’s hard to justify treating them differently because they’re not citizens.”

Haughton is not a green-card holder, and the government contends that his detention is not extraordinary or unwarranted. His continuing imprisonment is attributable to his own “belated decision to seek an adjustment of status,” prosecutors argued in one court filing. ICE “vigorously disputes” the decision to grant him permanent residency, Assistant U.S. Attorney Lauren Wetzler wrote.

Yet U.S. District Judge Leonie M. Brinkema found that Haughton deserved a bond hearing, using a multi-part test as four federal appeals courts have done in similar cases. Advocates would rather see the Supreme Court adopt a standard applied by two other appellate courts and require bond hearings for all detainees after six months. The U.S. Court of Appeals for the 4th Circuit, which includes Maryland and Virginia, is not one of those six appeals courts.

“It really is night and day with the kind of remedy and the kind of system you end up with,” said Michael Tan, an immigration lawyer with the ACLU. In California, where the six-month rule applies, he said thousands have received hearings. In Delaware, New Jersey and Pennsylvania, where there is no firm time limit, only about two dozen immigrants have.

The Supreme Court could embrace one of the standards applied by the federal appeals courts, set yet another standard or rule that bond hearings are not required at all.

The justices could also decide whether the burden of proof in such a hearing would fall on the government or on the detainee, an issue that has divided lower courts. Prosecutors in Virginia are fighting Brinkema’s decision to force the government to prove that Haughton is a flight risk or a danger.

Another question is what the court will make of the government’s admission that the statistics it relied on in 2003 were wrong. The solicitor general had said that appealed cases take an average of 233 days to complete, or a little less than eight months. In fact, the office acknowledged in August that, on average, cases took 382 days, or more than a year.

In 2015, according to the Justice Department, the average case took 313 days, but that does not include the time a person spent in detention before filing or any post-decision court action.

Haughton is scheduled to get his bond hearing before an immigration judge on Wednesday, after 395 days in detention.