The Supreme Court on Thursday ruled against a convicted sex offender in a decision that deals with how much authority Congress can cede to other branches of the federal government.

The case involved the “nondelegation doctrine,” which states that one branch of government cannot allow another branch to execute its powers, largely Congress not allowing other branches to legislate.

ADVERTISEMENT

Plaintiff Herman Gundy argued that a sex offender law violated the doctrine because Congress granted discretion on how to enforce the act to the attorney general, rather than having lawmakers make the determination.

But the justices found that the law does not violate the doctrine.

The courts's liberals, Justices Elena Kagan Elena KaganREAD: Supreme Court justices mourn death of Ginsburg, 'an American hero' Democrats, advocates seethe over Florida voting rights ruling Supreme Court denies push to add Green Party candidates to Montana ballot MORE, Ruth Bader Ginsburg Ruth Bader GinsburgTrump 'no longer angry' at Romney because of Supreme Court stance Fox News poll: Biden ahead of Trump in Nevada, Pennsylvania and Ohio On The Money: Anxious Democrats push for vote on COVID-19 aid | Pelosi, Mnuchin ready to restart talks | Weekly jobless claims increase | Senate treads close to shutdown deadline MORE, Stephen BreyerStephen BreyerREAD: Supreme Court justices mourn death of Ginsburg, 'an American hero' Ginsburg death sets up battle over future of court Trump's Supreme Court list reveals influence of Clarence Thomas MORE and Sonia Sotomayor Sonia SotomayorToomey, swing state Republican, supports Senate moving on Trump Supreme Court nominee Names to watch as Trump picks Ginsburg replacement on Supreme Court READ: Supreme Court justices mourn death of Ginsburg, 'an American hero' MORE, all signed on to the majority opinion, while conservative Justice Samuel Alito Samuel AlitoAbortion, gun rights, ObamaCare at stake with Supreme Court pick READ: Supreme Court justices mourn death of Ginsburg, 'an American hero' Ginsburg death sets up battle over future of court MORE agreed with them in a separate concurring opinion.

Justices Neil Gorsuch Neil GorsuchAbortion stirs GOP tensions in Supreme Court fight Poll: 59 percent think president elected in November should name next Supreme Court justice The Hill's Morning Report - Sponsored by Facebook - Trump, GOP allies prepare for SCOTUS nomination this week MORE and Clarence Thomas Clarence ThomasGOP senator attacks Biden: 'I'm not sure what he recalls' Abortion, gun rights, ObamaCare at stake with Supreme Court pick Rush Limbaugh encourages Senate to skip hearings for Trump's SCOTUS nominee MORE and Chief Justice John Roberts dissented. Justice Brett Kavanaugh Brett Michael KavanaughTrump faces tricky choice on Supreme Court pick The Hill's 12:30 Report: Trump stokes fears over November election outcome The Hill's Morning Report - Sponsored by Facebook - Trump previews SCOTUS nominee as 'totally brilliant' MORE did not participate.

Gundy was on supervised release from a prior drug conviction when he was convicted in the sexual assault of an 11-year-old girl in Maryland.

After he served his sentence on the sexual assault conviction, he traveled to New York in order to serve a sentence for violating his supervised release, but didn’t register as a sex offender in Maryland or New York.

He was then indicted for failing to register as a sex offender as required under the Sex Offender Registration and Notification Act, a law passed under the Adam Walsh Child Protection and Safety Act, named for the murdered child of “America’s Most Wanted” host John Walsh.

He challenged that law before the Supreme Court.

In the opinion, Kagan wrote that the text of the law “considered alongside its context, purpose, and history, makes clear that the attorney general’s discretion extends only to consideration and addressing feasibility issues.”

And she wrote that, if the attorney general’s authority under this law was unconstitutional “then most of government is unconstitutional – dependent as Congress is on the need to give discretion to executive officials to implement its programs.”

In a separate opinion, Alito also said that he would rule to uphold the law and the doctrine. But he signaled that he would be willing to overturn the doctrine if a majority of the court was on board.

“If a majority of this court were willing to reconsider the approach we have taken for the past 84 years, I would support that effort. But because a majority is not willing to do that, it would be freakish to single out the provision at issue here for special treatment,” Alito wrote.

“Because I cannot say that the statute lacks a discernible standard that is adequate under the approach this court has taken for many years, I vote to affirm.”

In the dissenting opinion, Gorsuch wrote that unlike Alito, he “would not wait” to rule against the doctrine.

“Working from an understanding of the Constitution at war with its text and history, the plurality reimagines the terms of the statute before us and insists there is nothing wrong with Congress handing off so much power to the attorney general,” Gorsuch wrote.

“But Justice Alito supplies the fifth vote for today’s judgement and he does not join either the plurality’s constitutional or statutory analysis, indicating instead that he remains willing, in a future case with a full court, to resist these matters.”

The conservative justice warned against allowing other branches of the federal government to effectively legislate.

“Yes, those affected are some of the least popular among us,” Gorsuch wrote of the sex offender registration law. “But if a single executive branch official can write laws restricting the liberty of this group of persons, what does that mean for the next?”

This report was last updated at 1:17 p.m.