The U.S. Supreme Court ruled Monday that states that still have the death penalty can use a controversial mix of drugs used for lethal injections.

The court’s decision was 5-4, with Justice Samuel Alito writing the majority. Chief Justice John Roberts and Justices Anthony Kennedy, Antonin Scalia and Clarence Thomas joined. The four liberal justices dissented. Justices Sonia Sotomayor and Stephen Breyer wrote two dissenting opinions.

As NBC News notes, lawyers for four Oklahoma death row inmates challenged the state’s use of the drug mix. They claimed that midazolam, which is used first, does not bring an inmate into a reliably deep unconsciousness, meaning that they could feel the pain caused by the second and third drugs used.

However, the court said that the lawyers could not provide an alternative method for executions. They also “failed to establish that Oklahoma's use of a massive dose of midazolam in its execution protocol entails a substantial risk of severe pain.”

The controversy over the drug mix arose after Clayton Lockett clearly felt pain when the drug was administered in a botched execution. Later, another convict, Charles Warner, reportedly yelled “My body is on fire” as he was executed.

As the New York Times notes, states with the death penalty have had to use this new first drug after the previous barbiturates became unavailable from European and American manufacturers.

The case is known as Glossip v. Gross and can be read in full right here.