Warren Hill, an intellectually disabled prisoner, has been spared the death chamber just 30 minutes before he was due to die by lethal injection in Georgia despite a US supreme court ban on executions of people with learning difficulties.

Hill, 53, had already taken an oral sedative of Ativan to help calm himself for the gurney before he learned of the stay of execution from the federal appeals court for the 11th circuit. The court agreed to consider the issue of his intellectual disabilities in the light of a 2002 US supreme court ruling that prohibits executions of "mentally retarded" prisoners as a breach of the constitutional safeguard against cruel and unusual punishment.

Georgia is the only state in the union that insists prisoners must prove "beyond a reasonable doubt" that they have learning difficulties – a standard that experts say is almost impossible to achieve.

Hill had been scheduled to be executed at 7pm at the same prison where Troy Davis was put to death in September 2011 amid massive international outcry. Davis's death, despite substantial evidence of his innocence, prompted dramatic scenes at the prison where hundreds of protesters were confronted by armed Swat police armed with a police helicopter flying overhead.

Hill's scheduled execution attracted a comparatively small response, with few protesters and campaigners present in the prison grounds as the appointed hour approached. This was the second time in seven months that Hill has come close to the death chamber: last July he was spared by just 90 minutes and the experience was repeated on Tuesday night with just 30 minutes to go.

Behind the scenes, last-ditch efforts to stave off the sentence have now mostly been exhausted. Former president Jimmy Carter repeated his appeal for a postponement, saying that "Georgia should not violate its own prohibition against executing individuals with seriously diminished capacity."

The European Union also made formal protests through the British and Irish consulates in Atlanta focusing on Hill's disabilities. "This case has raised attention around the world, with particular concern around Mr Hill's intellectual disability, said Annabelle Malins, the British consul general.

In the end, two courts stepped in to stop the execution. While the 11th circuit of the federal courts wanted to take a look at the issue of Hill's intellectual disabilities, the Georgia appeal court also wanted to stave off the death penalty to give it time to consider the process that would have been used to kill the prisoner.

Hill's attorney, Brian Kammer, issued a statement after the stay: "All the doctors who have examined Mr. Hill are unanimous in their diagnosis of mental retardation, so there is no question that his execution would have been in violation of the US supreme court's 2002 ruling in Atkins v Virginia."

"The state of Georgia remains an extreme outlier in requiring that defendants prove they have mental retardation 'beyond a reasonable doubt'. This is the strictest standard in any jurisdiction in the nation. Even Warren Hill, a man with an IQ of 70 who is diagnosed as mentally retarded by every doctor who has examined him, found it impossible to meet this standard of proof."

Since last July the state has opted to use just one massive dose of the sedative pentobarbital as its lethal injection, instead of a cocktail of three different drugs. The triple injection had become problematic because Georgia was running out of the drugs in question.