(Reuters) - A federal appeals court has halted an execution scheduled for Thursday of a man convicted of raping a woman and then killing her and her boyfriend with the help of a group of friends 13 years ago.

Death-row inmate Dexter Johnson is shown in this undated photo in Huntsville, Texas, U.S., provided August 14, 2019. Texas Department of Criminal Justice/Handout via REUTERS

The 5th U.S. Circuit Court of Appeals ruled late on Wednesday to send Dexter Johnson’s case back to a federal district court after his attorneys argued the 31-year-old was intellectually disabled and previously lacked sufficient legal representation, according to court documents.

Johnson was due to be executed by lethal injection at 6 p.m. local time at the state’s death chamber in the city of Huntsville.

It was the second time that Johnson has received a stay ahead of his scheduled execution. In April, a federal judge also postponed his execution.

A jury had found him guilty of robbery, kidnapping and murder and sentenced him to die in 2007, over the deaths of Maria Aparece and her boyfriend Huy Ngo.

On June 18, 2006, Johnson was cruising around Houston with four friends looking for someone to rob when the group came upon Aparece and Ngo who were sitting in Aparece’s Toyota near her house, according to prosecutors.

Johnson approached the vehicle with a shotgun and threatened to shoot the couple if they did not let him and two of his friends into her car. He then drove Aparece’s car around demanding money from the couple, court records said.

With his other two friends following in their vehicle, Johnson found a wooded area where he stopped and raped Aparece. He and one of his friends then marched the couple into the woods and shot them in the head, court documents showed.

After the killings, the group used a credit card they took from the couple at two separate Walmarts. The group was caught days later, after authorities found Aparece’s car, court papers said.

Johnson’s accomplices were also convicted and sentenced to lengthy prison terms. Ashley Ervin is serving life while Keithron Fields is serving life without parole.

At the time of their arrest, Houston police said they believed the group was also responsible for at least two other murders, along with a string of aggravated robberies and kidnappings.