States can still use the sedative drug midazolam in lethal injections, according to today's Supreme Court decision. But how exactly does the drug work, and why do some say that it's unreliable?

In a 5-to-4 vote, the court ruled that using midazolam does not violate the Eighth Amendment, which prohibits "cruel and unusual punishment." In executions, the drug has been used to induce unconsciousness before other drugs are administered to stop an inmate's breathing and stop the heart.

However, midazolam was involved in several botched executions last year, including the case of Clayton Lockett from Oklahoma, who lived for about 45 minutes after he was administered drugs for lethal injection, and was seen convulsing and writhing before dying of a heart attack. (It was later determined that the IV line used to deliver the drugs in Lockett's execution was not properly placed.)

In another controversial execution in Ohio, which also used midazolam, the inmate seemed unconscious at first, but then made loud snorting and choking noises before being pronounced dead, according to the New York Times. The combination of drugs used in the Ohio case had not previously been used in an execution.

The defendants who brought the case before the Supreme Court, who are all death row inmates, had argued that midazolam could not reliably induce unconsciousness. The drug is not approved by the Food and Drug Administration for use as an anesthetic by itself. [Mistaken Identity? 10 Contested Death Penalty Cases]

The drug slows down brain activity, which allows for relaxation and sleep, according to the National Institutes of Health. And the drug is sometimes used before medical procedures, or before anesthesia is given, to cause drowsiness, relieve anxiety and prevent a person from remembering a procedure, the NIH says.

But some experts say there is a limit to midazolam's sedative effects, so that even high doses of the drug might not keep a person unconscious. The Supreme Court heard testimony from Dr. David Lubarsky, who said that midazolam would not be able to keep someone sedated if they were also given other drugs that caused extreme pain.

According to Lubarsky, midazolam produces a sedative effect because it facilitates the binding of a brain chemical called GABA to brain receptors, which hinders the flow of electrical impulses in the brain. However, other drugs historically used in lethal injections, like sodium thiopental, have a greater effect on the brain because they can also mimic GABA's effects. Midazolam does not, Lubarsky said.

This means that the effect of midazolam "is capped at a lower level of sedation," wrote the justices who dissented with the decision. Lubarsky cited scientific studies and textbooks to back up his arguments, according to the Court's dissent, written by Justice Sonia Sotomayor.

Patrick Forcelli, an assistant professor of pharmacology at Georgetown University Medical Center who was not involved with the case, told Live Science that he agreed with Lubarsky's description of how midazolam works.

The drug "increases the effect that GABA has, so it inhibits neurological activity," Forcelli said. But midazolam cannot directly activate the GABA receptor, so there seems to be a limit to the level of sedation the drug can cause, he said.

"From the doses that have been looked at, [midazolam] provides sedation, but not true anesthesia," Forcelli said

Another expert who testified in the case disagreed, saying that the dose of midazolam that will now be used in Oklahoma, 500 milligrams, would keep a person unconscious throughout an execution, because a very high dose of the drug would effecitvely paralyze the brain.

But this expert, Dr. Roswell Lee Evans, did not cite scholarly research to back up his statements. Instead, he relied "primarily on two sources: the Web site www.drugs.com, and a 'Material Safety Data Sheet' produced by a midazolam manufacturer," the dissent says.

In the decision made today, five justices on the court sided with Evans, agreeing that a 500-milligram dose of the drug would work. But the other four justices disagreed, writing in their dissent: "In reaching this conclusion, the Court sweeps aside substantial evidence showing that, while midazolam may be able to induce unconsciousness, it cannot be utilized to maintain unconsciousness in the face of agonizing stimuli."

Forcelli said that the effect of very high doses of midazolam is unknown, because those dosage levels have not been tested. Lower doses of the drug do not cause anesthesia, but because higher doses have not been tested, "there is a gap in the data," Forcelli said.

Some states previously used sodium thiopental, which is an anesthetic, to induce unconsciousness in executions. But pharmaceutical companies stopped selling the drug because they did not want it to be used for executions, causing the drug to become scarce.

Copyright 2015 LiveScience, a Purch company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.