*Correction appended.

Editors note: This story has been updated throughout.

The Texas Court of Criminal Appeals on Thursday halted the upcoming execution of Robert Roberson, who was sentenced to death for killing his two-year-old daughter in 2002.

The appeals court sent the case back to trial court in Anderson County after Roberson's legal team argued that his conviction was based on junk science. His execution had been scheduled for June 21.

Roberson, condemned for the death of his two-year-old daughter Nikki in Palestine, has denied he murdered her, insisting she stuck her head after falling out of bed. But the Anderson County district attorney's office argued at trial that Roberson acted intentionally, pointing to experts who testified that Nikki's injuries were consistent with signs of shaking, bruising and blunt force trauma.

Other witnesses testified that Roberson had a bad temper and would shake and spank Nikki when she wouldn’t stop crying.

Roberson's attorneys at trial did not deny he killed his daughter but argued he suffers from mental lapses due to a brain injury. His appeals attorneys argued that he didn't have a fair trial because his mental health expert was not allowed to testify to that brain injury claim.

Read More Issue of Mental Health Assessment a Focus as 3 Fight Death Sentences

A second legal team last year entered the fray, though, and argued that Roberson's appeals attorneys had conflicts of interest, which could have complicated his push for relief, and requested another attorney join the team to review their work. Both legal teams appealed to the U.S. Supreme Court with separate arguments to get Roberson's case another look. Both teams were unsuccessful, and his execution was scheduled.

Roberson is currently represented by attorneys from Texas Defender Service and the Office of Capital and Forensic Writs. The latter group handled the execution stay request approved Thursday.

Backed by affidavits from medical and other scientific experts who reviewed the case, Roberson's lawyers argued in the stay request that Nikki did not have a broken neck, an injury often tied to Shaken Baby Syndrome.

They add that Nikki was sickly and drew the attention of CPS investigators due to head injuries and choking incidents she suffered before Roberson entered her life. Also, prosecutors had said at trial that Nikki was sexually assaulted, a claim later debunked and abandoned but an inflammatory one that jurors nonetheless heard, his attorneys argued.

New evidence shows that Roberson is actually innocent of capital murder and that "the state relied on false, misleading and scientifically invalid testimony to obtain his conviction," his attorneys wrote in the filing. They also asserted that Roberson's right to due process was violated at trial because prosecutors introduced "false forensic science testimony that current science rejects."

Experts, his defense counsel and the district attorney's office did not take seriously Roberson's claim that Nikki fell, attorneys with the Office of Capital and Forensic Writs wrote in the request.

"Instead of taking Robert’s explanation about a fall seriously or exploring all possible causes of the injury sustained by a chronically ill child who had been at the doctor’s office with 104.5-degree temperature only two days before," Roberson's attorneys wrote, "a tragedy was hastily deemed a crime and a father, doing the best he could to care for his daughter despite severe cognitive impairments, was branded a murderer."

If Roberson's trial were today, he would not be convicted or on death row, said Lee Kovarsky, Roberson's attorney with the Texas Defender Service.

"Robert was convicted under a scientific theory that, if offered as cause of death today, would consistently result in acquittal," he said via text message. "Texas courts will now have ample opportunity to do justice in his case."

Anderson County District Attorney Allyson Mitchell said in a statement that though the case was tried by a predecessor, her office stands behind the evidence and conviction.

"We understand and respect the Court of Criminal Appeals decision in being thorough with Roberson’s case and we plan on addressing each issue remanded as prescribed by law through expert testimony and the trial evidence itself," Mitchell said. "We believe that upon the rehearing of the issues raised, the decision made by the Anderson County Jury condemning Mr. Roberson to death for his crime will be upheld."

Doug Lowe, who was the Anderson County district attorney during the trial, said he disagrees with Roberson's attorneys' claim that the conviction was based on junk science but accepts that "the courts want to make sure everything was done right."

Correction: An earlier version of this story incorrectly reported the day the Court of Criminal Appeals halted Robert Roberson's execution.