The Supreme Court on Monday held that Missouri can execute a man who claims to suffer from a medical condition that will make lethal injection excruciatingly painful.

The court voted 5-4 along ideological lines despite some suggestion during oral arguments in November that Justice Brett Kavanaugh, President Donald Trump's second nominee to the high court, would join the panel's liberal members in barring the execution.

Aside from some of the intrigue concerning Kavanaugh's vote, the outcome in the case, Bucklew v. Precythe, was not wholly surprising. The nation's top court has long held that the death penalty is constitutional, and has never barred a state's chosen method of execution on the grounds that it violated the Eighth Amendment's prohibition of "cruel and unusual" punishment.

The case concerned Russell Bucklew, a convicted murderer and rapist who suffers from an extremely rare disease called cavernous hemangioma, which causes blood-filled tumors to grow around his head and neck.

Bucklew's attorneys argued that lethal injection will cause Bucklew to suffer from the feeling that he's suffocating for several minutes during the execution. For Bucklew, they argued, the punishment is cruel and unusual, even if it the method is permissible for others.

Justice Neil Gorsuch, who wrote the opinion of the court, said that the Constitution's prohibition on cruel and unusual punishment does not mean that executions must be painless.

"At the time of the Amendment's adoption, the predominant method of execution in this country was hanging," Gorsuch wrote. "While hanging was considered more humane than some of the punishments of the Old World, it was no guarantee of a quick and painless death."

Gorsuch also concluded that under the court's precedents in two previous cases, Bucklew is required to present an alternative method of execution that is feasible, readily implemented and likely to reduce the chances of extreme pain.

Bucklew, whose lawyers suggested the largely untested method of nitrogen asphyxiation as an alternative to lethal injection, failed to meet those burdens, Gorsuch said. Alabama, Oklahoma and Mississippi have approved the use of nitrogen asphyxiation, though it remains experimental.

In a concurrence, Kavanaugh suggested that convicts worried about particular methods of execution should be able to come up with an alternative, and emphasized that the alternative does not have to be legal under current state law.

Kavanaugh wrote that "the firing squad is an alternative method of execution that generally causes an immediate and certain death, with close to zero risk of a botched execution," citing comments from Justice Sonia Sotomayor in a separate case.

In a dissent, Justice Stephen Breyer, joined by his fellow liberals, wrote that the majority's requirements could permit states to execute those who will endure pain similar to that inflicted by burning at the stake.

"The majority acknowledges that the Eighth Amendment prohibits States from executing prisoners by 'horrid modes of torture' such as burning at the stake," Breyer wrote. "But the majority's decision permits a State to execute a prisoner who suffers from a medical condition that would render his execution no less painful."

In a separate dissent, Justice Sonia Sotomayor took issue with what she described as the majority's dismissiveness. In death penalty cases, Sotomayor wrote, the court has a particularly grave responsibility.

"If a death sentence or the manner in which it is carried out violates the Constitution, that stain can never come out," she wrote. "Our jurisprudence must remain one of vigilance and care, not one of dismissiveness."