On April 21, 1993, the El Paso police picked up a seventeen-year-old boy named David Rangel and questioned him about a double murder that had occurred the night before. Detective Al Marquez and a second officer browbeat Rangel for hours, telling him—falsely—that others had already implicated him and that he would get life and be raped in prison if he didn’t cooperate. Rangel maintained his innocence, but he mentioned that his cousin, sixteen-year-old Daniel Villegas, had boasted in a phone call about shooting the victims—Armando “Mando” Lazo and Bobby England, two teenagers from Villegas’s neighborhood—with a shotgun. Rangel told the officers that Villegas was joking, but Marquez demanded that Rangel write out a statement implicating his cousin. He then forced him to revise it, leaving out the reference to the shotgun; that detail, Marquez angrily told him, was “incorrect.” The victims had been shot with a .22 caliber pistol. Villegas, it seemed, didn’t know enough about the crime to properly brag about it.

Nevertheless, Villegas was picked up later that same night and interrogated, without speaking to his parents or an attorney. Early the next morning, Marquez extracted a signed confession from the boy, using the same aggressive tactics he employed with Rangel. Villegas recanted the statement hours later, but the confession became the key piece of evidence in his prosecution, which eventually resulted in a life sentence. He was sent to prison, where he spent the next seventeen years. Finally, in the summer of 2012, El Paso judge Sam Medrano ruled that Villegas had been coerced into a false confession. Medrano’s remarkable ruling followed a series of hearings in 2011 during which Villegas received excellent representation by El Paso attorney Joe Spencer. Villegas’s bills were paid for by a crusading family friend named John Mimbela, who has worked tirelessly on the case for years. Medrano recommended Villegas receive a new trial, and the judge took the unusual step of declaring Villegas factually innocent. Last month, after sitting on the case for almost a year and a half, the Court of Criminal Appeals agreed that Villegas’s conviction must be set aside, though it stopped short of endorsing Medrano’s finding of actual innocence.

Villegas remains in county jail in El Paso, awaiting a decision from district attorney Jaime Esparza—who prosecuted the original case almost two decades ago—about whether he will retry Villegas, who is now 36, or let him walk free. Villegas could go home—at least for the time being—as soon as January 14, when a hearing will be held in Judge Medrano’s court to determine if Villegas should be allowed to post bond while he waits for Esparza’s decision regarding a new trial.

It is hard to see how Esparza can do anything but dismiss the charges. As Medrano’s 78-page ruling makes clear, the “incorrect” shotgun was just the beginning of the problems with the state’s case. Villegas’s confession, the only real piece of evidence against him, was filled with inconsistencies when compared with not only the factual record of the crime but also “confessions” collected from his alleged accomplices. Yet Esparza seems to be digging in his heels. While he has not yet announced whether he will retry Villegas, he made a short-lived and futile attempt to have Judge Medrano removed from the upcoming bond hearing, a clear effort on Esparza’s part to keep Villegas in jail as long as possible.

Villegas’s case is a classic example of two phenomena often seen in wrongful convictions, one of which is well understood by juries. As the hearing in Medrano’s court made abundantly clear, Villegas was a victim of poor lawyering by his court-appointed counsel. Everybody knows that a good lawyer makes all the difference, especially when a defendant is facing a life sentence, but not every case offers such a stark and compelling demonstration of why this is true. Back in 1994 and 1995, Villegas had actually been tried twice. For his first trial, his family came up with the money to hire a well-respected El Paso attorney named Jaime Olivas, who called eighteen witnesses and grilled Detective Marquez on the stand, getting him to admit that he had been the subject of multiple internal affairs investigations and over thirty citizen complaints. (Olivas also called a former prosecutor who testified that he had twice presented perjury charges against Marquez to a grand jury.) Olivas also carefully walked the jury through all the inconsistencies in the alleged confessions. Still, a confession—even one as problematic as Villegas’s—is a difficult hurdle for a defense lawyer to overcome. At least one juror remained unconvinced, and the result was a hung jury and a mistrial.

The state decided to prosecute again. By that point, the family’s resources were depleted, and Villegas was forced to rely on a court-appointed attorney. Despite being appointed just 67 days before the trial date, the new attorney, John Gates, inexplicably failed to ask the judge for a continuance, which would have given him more time to prepare. He hired an investigator only six days before trial. Gates had the transcript of the previous trial—an outstanding road map to probable victory—but in the end he called only one witness. He made no opening statement and gave the jury no convincing reason to question the validity of Villegas’s confession. His closing statement was a poorly conceived effort to convince the jury that although Villegas may in fact have been the shooter, he was only trying to scare the boys, not kill them. Villegas’s life sentence could not have come as a surprise to anyone who attended the trial.

The second thing that sank Villegas, of course, was his false confession, a phenomenon that is harder to understand, but no less common. Most of the cases in the recent wave of exonerations in Texas have been based on new analysis of DNA evidence not presented at the original trial. Yet many of those same convictions also involved false confessions, a fact that tends to get lost in the discussion of all the promising new technologies in criminal science. What happens if you don’t have DNA evidence to back up your claims of innocence? Usually, not much. If Villegas is eventually exonerated, it may be the first time that someone who was convicted based on a false confession is set free without DNA evidence confirming his or her innocence.

But why would anyone confess to something he didn’t do? A lengthy New Yorker story published last month attempted to answer that question by delving into the fascinating details of the Reid Technique, a commonly used interrogation method developed in the fifties by a polygraph expert named John Reid. Rather than verbally and physically abusing suspects, which was the preferred tactic in most police stations at the time, Reid used psychological techniques to great effect—punishing responses that didn’t lead toward confession and subtly rewarding those that did, until the exhausted suspect came to understand that pleasing Reid was the only way to extricate himself from the tiny room and the overbearing men inside it. Over the years, the Reid Technique and similar methods became the norm in law enforcement. Only now, decades later, are some observers beginning to question whether it leads to the truth or merely to confessions:

A growing number of scientists and legal scholars . . . have raised concerns about Reid-style interrogation. Of the three hundred and eleven people exonerated through post-conviction DNA testing, more than a quarter had given false confessions—including those convicted in such notorious cases as the Central Park Five. The extent of the problem is unknowable, because there’s no national database on wrongful convictions. But false confessions, which often lead to these convictions, are not rare, and experts say that Reid-style interrogations can produce them.

Adolescents are particularly prone to false confessions, a phenomenon detailed in an amicus brief filed in Villegas’s case by the Center on Wrongful Convictions of Youth at the Northwestern University School of Law. In a 2005 study of 340 exonerations, researchers found that juvenile exonerees were three times as likely as adults to have given a false confession. “Juveniles are categorically less able to see the long-term consequences of their actions,” said Northwestern’s Josh Topfer, who worked on Villegas’s case. “If you are just focused on getting out of that interrogation room, you might say anything,” he said. “When you were a kid, could you really fathom that somebody might get life in prison for something they didn’t do?”

If Villegas’s case demonstrates anything, it’s the simple but alarming fact that it is not difficult to get scared kids—even ones as “tough” as Villegas and his friends believed themselves to be—to admit to anything. In fact, prior to his interrogation of Villegas, Detective Marquez already had one confession in the bag. Acting on a tip that would later prove to be false, Marquez arrested a fifteen-year-old boy named Michael Johnston and, along with another detective, interrogated him for eight hours outside the presence of his parents. Finally, after being threatened with the death penalty and prison rape, Johnston confessed to the crime in a statement given at three in the morning. But Marquez—who is now working as a bailiff, about as far from a murder detective as you can get while still holding a badge—ultimately decided that Johnston hadn’t committed the crime and later admitted at Villegas’s trial that the confession had to have been false. Then, too, there were the confessions of Villegas’s alleged accomplices, which were also thoroughly debunked during the hearing in Medrano’s court. Amazingly, three other suspects also either boasted of or admitted to the crime, none of whom apparently had anything to do with it.

The Center on Wrongful Convictions of Youth publishes a best-practices manual on sound interrogation techniques meant to minimize the chances for a false confession, and also offers model legislation concerning juvenile defendants for states to consider. Texas, to its credit, is one of the few states where police must bring a child before a magistrate judge before he can waive his Miranda rights (to remain silent, have an attorney present during questioning, etc.). But in Villegas’s case Marquez had already begun his interrogation before bringing him before the judge and, according to testimony at Villegas’s hearing, had threatened to take him out to the desert and beat him if he didn’t waive his rights.

Texas, however, does not require that interrogations be recorded. (Confessions are usually taped, but not the questioning that leads up to them.) “That is the number one most important reform when it comes to limiting false confessions,” Topfer said. During the last legislative session, Senator Rodney Ellis, the Houston Democrat who has sponsored a host of criminal justice reforms over the years, offered a bill requiring such recordings, but it went nowhere. Currently, nineteen states and the District of Columbia require recordings of interrogations for serious crimes. In two states, juveniles are essentially precluded from waiving their Miranda rights at all, a model commonly found in Europe as well. This means they are never questioned outside the presence of an attorney. No doubt this makes it more difficult for cops asked to solve the kind of terrible crimes associated with, for example, gang violence, in which both perpetrator and victim are often juveniles. After reading the sordid details of the prosecution of Daniel Villegas, however, it’s hard to argue that what Texas is doing now is working.

Overturning just this one conviction was a monumental task, Topfer said. Changing attitudes about false confessions is another thing altogether. Still, trends are promising, he said, and the Villegas case will help the cause. “Twenty years ago, nobody would think you could convince a judge that false confessions are a real problem,” he said. “Now, through a lot of advocacy work, it has become clear that it happens at an alarming rate.” Clear to everyone, perhaps, except the El Paso district attorney.

UPDATE (January 15, 2014): Daniel Villegas was released on bond Tuesday morning, walking free for the first time in nearly nineteen years. The district attorney’s office still has not announced whether or not it will retry him for the same crime, but a hearing on a possible retrial is set for next week.