The Texas Supreme Court halted Robert Roberson’s scheduled execution late Thursday night, following an extraordinary series of legal twists and turns spurred by a bipartisan group of state lawmakers.

The legislators, including influential members of the House Criminal Jurisprudence Committee, deployed a sequence of jiu-jitsu-like moves to give Roberson a chance to prove his innocence. Their efforts centered around a first-of-its-kind statute in Texas that allows people incarcerated based on flawed forensics to challenge their convictions.

“The vast team fighting for Robert Roberson — people all across Texas, the country, and the world — are elated tonight that a contingent of brave, bipartisan Texas lawmakers chose to dig deep into the facts of Robert’s case that no court had yet considered and recognized that his life was worth fighting for,” Roberson’s lawyer, Gretchen Sween, said in a statement. “He lives to fight another day and hopes that his experience can help improve the integrity of our criminal legal system.”

Roberson was sent to death row in 2003 for killing his 2-year-old daughter Nikki. Medical professionals attributed the child’s death to so-called shaken baby syndrome, or SBS: a diagnosis based on the belief that a certain combination of injuries found in a baby or toddler could only be caused by violent shaking. This theory has since been disproven by scientific research. Across the country, 34 people convicted based on SBS have been exonerated, according to the National Registry of Exonerations.

Roberson, who insists he is innocent, challenged his conviction using the state’s so-called junk science law. But Texas courts ignored the overwhelming evidence undermining the state’s case against him, greenlighting his execution on October 17. As that date approached, Roberson gained the support of a bipartisan group of more than 80 Texas lawmakers, who implored both the board and the courts to spare his life.