McALESTER, Okla. — Richard E. Glossip, a death row inmate who challenged the constitutionality of Oklahoma’s lethal injection protocol before the Supreme Court, was granted a stay of execution shortly before he was scheduled to be put to death here Wednesday, the latest twist in a case that has attracted widespread support from celebrities and death-penalty opponents who say he is innocent.

Mr. Glossip, 52, was one of three condemned inmates who argued that Oklahoma’s three-drug combination risked causing unconstitutional pain and suffering, after one of the drugs — midazolam, a short-acting sedative — had a role in three apparently painful executions last year. In June, the Supreme Court upheld the state’s drug protocol and ruled against the inmates. Midazolam was one of the three drugs that was set to be injected into Mr. Glossip on Wednesday afternoon at a state prison in McAlester.

But more than an hour after the scheduled execution time, Gov. Mary Fallin issued a 37-day stay to address questions about the state’s execution protocols. Ms. Fallin said the stay would allow the Department of Corrections and its lawyers to determine whether potassium acetate — a drug the state planned to use that it had not previously disclosed — complied with the state’s court-approved protocols.

“Last-minute questions were raised today about Oklahoma’s execution protocol and the chemicals used for lethal injection,” Ms. Fallin said in a statement. “After consulting with the attorney general and the Department of Corrections, I have issued a 37-day stay of execution while the state addresses those questions and ensures it is complying fully with the protocols approved by federal courts.”