In January 2011, William Carl Welsh pleaded guilty in an Oregon federal district court to failing to comply with the Sex Offender Registration and Notification Act (“SORNA”) and was sentenced to 673 days in the custody of the Bureau of Prisons. Welsh admitted that he had not updated his sex offender registration in Oregon when he left the state to move to Belize. While in the custody of the Bureau of Prisons for that offense, Welsh was certified as a sexually dangerous person and civilly committed under § 4248 of Title 18, enacted by the Adam Walsh Child Protection and Safety Act of 2006.
The Supreme Court later held in a different case that the version of SORNA then applicable to Welsh’s offense did not require a sex offender to update his registration in his former homestate after moving to a foreign country. As a result, Welsh successfully moved to have his SORNA conviction vacated. He then sought relief from his civil commitment. Welsh claimed that the judgment was void under Federal Rule of Civil Procedure. 60(b)(4) because he was never in the legal custody- of the Bureau of Prisons. He also sought relief under Rules 60(b)(5) and 60(b)(6) because his civil commitment was based on a now-vacated conviction.,
Because Welsh’s civil commitment judgment is not void under Rule 60(b)(4) and the district court had discretion to deny relief under Rules 60(b)(5) and 60(b)(6), we affirm.
I.
Before explaining our decision, we provide additional details of the' unusual events giving rise to this appeal.
A.
' As we noted earlier, Welsh pleaded guilty to failing to update his registration as a sex offender as required by SORNA, 18 U.S.C. § 2250(a). While Welsh was confined for that offense, the government certified him as a “sexually dangerous person” and transferred him to the Butner Federal Correctional Institution in North Carolina.
Such a certification stayed Welsh’s release pending a hearing to determine whether he was.a sexually dangerous person. 18 U.S.C. § 4248(a). Under federal law, a person is a. “sexually dangerous person” if he has “engaged or attempted to engage in sexually violent conduct or child molestation and ... is sexually dangerous to others.” 18 U.S.C. § 4247(a)(5). A person is sexually dangerous to others if he “suffers from a serious mental illness, abnormality, or disorder as a result of which he would have serious difficulty in refraining from sexually .violent conduct or child molestation if released.” ■■ 18 U.S.C. § 4247(a)(6). If, after a hearing, “the court finds by clear and convincing evidence that the person is a sexually dangerous person, the court shall commit the person to the custody of the Attorney General.” 18 U.S.C. § 4248(d). •
The U.S. District Court for the Eastern District of North Carolina found Welsh to be a sexually dangerous person and ordered him committed. The court’s determination rested largely on Welsh’s criminal history, which includes repeated convictions for child molestation, sodomy, and sexual abuse dating back to 1979. The court also “considered Welsh’s poor performance on supervision, including his absconding to Belize.” J.A. 59. And the court relied on testimony from two experts who, after evaluating Welsh, concluded that he met the criteria for civil commitment.
Welsh remains committed at the Butner Federal Correctional Institution. Pursuant to 18 U.S.C. § 4247(e)(B), the director of the facility provides the district court with an annual report on Welsh’s mental condition and whether his commitment should continue. Most recently, in Welsh’s 2017 annual report, a forensic psychologist concluded that Welsh “continues to suffer from a severe mental illness, abnormality, or disorder that would cause him to experience serious difficulty in refraining from sexually violent conduct or child molestation if he was released to the community” and that “[therefore, discharge or conditional release is not recommended at this time.” J.A, 149.
B.
In 2016, the Supreme Court decided in Nichols v. United States that SORNA— before it was amended in February 2016— did not require a person to update his registration in a state that he was leaving in order to travel to a foreign country. — U.S. —, 136 S.Ct. 1113, 1118, 194 L.Ed.2d 324 (2016). As a result, a federal district court in Oregon granted Welsh’s motion to vacate his conviction for violating SORNA, concluding that “the factual basis for the guilty plea ... did not constitute a federal crime.” J.A. 73-74.
With vacatur in hand, Welsh moved for relief from his civil commitment judgment in the Eastern District of North Carolina, pursuant to Federal Rules of Civil Procedure 60(b)(4), (b)(5), and (b)(6). The district court denied the motion. We review denial of a Rule 60(b)(4) motion de novo. Wendt v. Leonard, 431 F.3d 410, 412 (4th Cir. 2005). Denial of a Rule 60(b)(5) or 60(b)(6) motion is reviewed for abuse of discretion. MLC Auto., LLC v. Town of S. Pines, 532 F.3d 269, 277 (4th Cir. 2008).
II.
To obtain relief from a judgment under Rule 60(b), a moving party must first show (1) that the motion is timely, (2) that he has a meritorious claim or defense, and (3) that the opposing party will not suffer unfair prejudice if the judgment is set aside. Nat’l Credit Union Admin. Bd. v. Gray, 1 F.3d 262, 264 (4th Cir. 1993). The party must also satisfy one of six enumerated grounds for relief under Rule 60(b). Id. at 266.
A.
In this case, Welsh sought relief under Rules 60(b)(4), (b)(5), and (b)(6). We start with Welsh’s claim under Rule 60(b)(4), which allows relief from a judgment that is void. The rule applies “only in the rare instance where a judgment is premised either on a certain type of jurisdictional error or on a violation of due process that deprives a party of notice or the opportunity to be heard.” U.S. Student Aid Funds, Inc. v. Espinosa, 559 U.S. 260, 271, 130 S.Ct. 1367, 176 L.Ed.2d 158 (2010).
Federal courts reserve relief under Rule 60(b)(4) “for the exceptional case in which the court that rendered judgment lacked even an ‘arguable basis’ for jurisdiction.” Id. When deciding whether an order is “void” under Rule 60(b)(4), “courts must look for the rare instance of a clear usurpation of power,” which is “only when there-is a total want of jurisdiction and no arguable basis on which it could have rested a finding that it had jurisdiction.” Wendt, 431 F.3d at 413 (internal quotation marks omitted).
Under the Adam Walsh Act, the government may certify a person as a sexually dangerous person if they: (1) are in the custody of the Bureau of Prisons; (2) have been committed to the custody of the Attorney General pursuant to section 4241(d);, or (3), have had all criminal charges dismissed' against them solely for reasons relating, tp their mental condition. 18 U.S.C. § 4248(a). Welsh was certified as a sexually dangerous person under the first category.
Welsh, however, argues that he was never in the legal custody of the Bureau of Prisons because (as the Supreme Court announced in ■Nichols) he never actually committed a crime by failing to register. As a result, he says, the district court lacked subject matter jurisdiction to commit him and its judgment is therefore void. The district court rejected Welsh’s argument, holding that § 4248(a)’s custody provision is not jurisdictional, and even if it were, Welsh was in the legal custody of the Bureau of Prisons when he was certified as a sexually dangerous person. We agree. " '
Specifically, the district court was correct in concluding that § 4248(a)’s custody requirement is not jurisdictional but rather is an element of a civil commitment claim. We begin with first principles. Jurisdiction refers to “a court’s adjudicatory authority.” Kontrick v. Ryan, 540 U.S. 443, 455, 124 S.Ct. 906, 157 L.Ed.2d 867 (2004). “[Jjurisdictional statutes speak to the power of the court rather than to the rights or obligations of the parties.” Landgraf v. USI Film Prods., 511 U.S. 244, 274, 114 S.Ct. 1483, 128 L.Ed.2d 229 (1994) (internal quotation marks omitted).
In Arbaugh v. Y & H Corp., the Supreme Court explained how to distinguish “jurisdictional” conditions from mere elements of a claim:
If the Legislature clearly states that a threshold limitation on a statute’s scope shall count as jurisdictional, then courts and litigants will be duly instructed and will not be left to wrestle with the issue. But when Congress does not rank a statutory limitation on coverage as jurisdictional, courts should' treat the restriction as nonjurisdictional in character.
546 U.S. 500, 515-16, 126 S.Ct. 1235, 163 L.Ed.2d 1097 (2006) (internal citation omitted); see also Reed Elsevier, Inc. v. Muchnick, 559 U.S. 154, 163, 130 S.Ct. 1237, 176 L.Ed.2d 18 (2010). Because nothing in the text of § 4248(a)’s custody requirement suggests that it’s a limit on the court’s jurisdiction, we think it appropriate to treat it as a mere element of a civil commitment claim,
Welsh contends otherwise, arguing that the government’s authority to civilly commit is constitutional only because of the custody requirement. We accept, that premise, but the fact that an element of a claim is constitutionally required does not mean that it is jurisdictional.. See United States v. Williams, 341 U.S. 58, 66, 71 S.Ct. 595, 95 L.Ed. 747 (1951) (“Even the unconstitutionality of the statute under which the proceeding is brought does not oust a court of jurisdiction.”).
Welsh insists that we’ve previously recognized the custody requirement as jurisdictional, citing United States v. Joshua, 607 F.3d 379, 388 (4th Cir. 2010), and United States v. Savage, 737 F.3d 304, 307 (4th Cir. 2013). See Appellant’s Br. at 30; Reply Br. at 7. But Joshua doesn’t say that § 4248(a) s custody requirement is a limit on jurisdiction and Savage uses the term “jurisdictional authority” in passing. In short, neither case lends Welsh the support he ascribes to them.
Welsh also claims that § 4248(g) of the Adam Walsh Act confirms the importance of the custody requirement to the federal government’s authority to civilly commit a person. The provision states that if a facility director “certifies to the Attorney General that a person, against whom all charges have .been dismissed for reasons not related to the mental condition of the person, is a sexually dangerous person, the Attorney General shall release the person1 18 U.S.C.§ 4248(g).
We are not persuaded that this provision has anything to say about whether the custody requirement is a limit on the district court’s jurisdiction. See, e.g., Henderson ex rel. Henderson v. Shinseki, 562 U.S. 428, 435, 131 S.Ct. 1197, 179 L.Ed.2d 159 (2011) (stating that “[ojther rules” that don’t govern a court’s adjudicatory capacity, “even if important and mandatory ... should not be given the jurisdictional brand.”). In any event, whether or not the custody requirement is jurisdictional, Welsh was in the custody of the Bureau of Prisons when he was certified as a sexually dangerous person. This is so because at the time of his certification Welsh was still serving a prison sentence pursuant to a court order committing him “to the custody of the United States Bureau of Prisons.” J.A. 22.
Welsh, relying on Joshua and United States v. Comstock, 560 U.S. 126, 130 S.Ct. 1949, 176 L.Ed.2d 878 (2010), argues that a person can never be in the Bureau’s “legal custody” if his underlying ponviction is subsequently vacated. These cases do not support Welsh’s premise. Joshua, for example, involved a military court-martial .of an Army officer. 607 F.3d at 381. That officer was eventually transferred from an Army garrison to the Butner Federal Correctional Institution. Id. There, the Bureau ' of Prisons housed the officer pursuant to a Memorandum of Agreement with the Army stating that military prisoners transferred to federal prison remain in the “permanent custody” of the U.S. Army. Id. at 382. When the government petitioned to civilly commit the officer as a sexually dangerous person, the district court dismissed the petition and we'affirmed because the officer was not in the “legal custody” of the Bureau of Prisons as required by the Adam Walsh Act. Id. at 391.
By contrast, Welsh was in the “legal custody” of the Bureau of Prisons as the term is interpreted in Joshua. Unlike the petitioner in Joshua, Welsh was “placed in the BOP’s custody by statutory authority, not as a matter of convenience.” See Savage, 737 F.3d at 307. And because the Bureau of Prisons was solely responsible for Welsh’s “custody, care, subsistence, education, treatment and training” it had “legal custody”—not mere physical custody—over Welsh. See id. at 308-09.
This interpretation of “legal custody” is also consistent with the Supreme Court’s decision in Comstock. There, the question was whether Congress had the constitutional authority to authorize federal civil commitment under § 4248. Comstock, 560 U.S. at 129-30, 130 S.Ct. 1949. The Court held that § 4248 does not give the federal government an unconstitutional general policing power, but rather, is “a reasonably adapted and narrowly tailored means of pursuing the Government’s legitimate interest as a federal custodian in the responsible administration of its prison system.” Id. at 148, 130 S.Ct. 1949.
Comstock, while certainly important, does not help Welsh because the constitutional justification for federal civil commitment is rooted in the federal government’s role as custodian, not in an underlying criminal conviction. As the Court explained, the Adam Walsh Act is a constitutional means of ensuring the safe and responsible administration of federal prisons because “at common law, one ‘who takes charge of a third person’ is ‘under a duty to exercise reasonable care to control’ that person to prevent him from causing reasonably foreseeable ‘bodily harm to others.’ ” Id. at 142, 130 S.Ct. 1949 (quoting Restatement (Second) of Torts § 319 (Am. Law Inst. 1965)). The Court likened civil commitment of a sexually dangerous person to a situation where a prisoner is infected by a communicable disease. In such a scenario, it would be necessary and proper for the government not to release that individual pursuant to its role as federal custodian. Id. at 142-43, 130 S.Ct. 1949.
The government’s interest in ensuring it doesn’t release dangerous individuals into society exists whenever it asserts legal custody over a person, even if the underlying conviction is ultimately vacated. Nor does the government’s constitutional authority to civilly commit depend solely on a criminal conviction because the Adam Walsh Act also authorizes the government to civilly commit individuals deemed incompetent to stand trial or for whom all criminal charges have been dismissed for reasons relating to their mental condition. See 18 U.S.C. § 4248(a).
Thus, regardless of whether § 4248(a)’s custody provision is jurisdictional, Welsh was in the legal custody of the Bureau of Prisons at the time the government certified him as a sexually dangerous person.-' The civil commitment judgment is therefore not void.
B.
We turn now to Welsh’s argument that the district court abused its discretion by denying him relief under Rules 60(b)(5) and 60(b)(6). Welsh’s burden here is a heavy one, as a district court abuses its discretion only where it “has acted arbitrarily or irrationally!!,] ... has failed to consider judicially recognized factors constraining its exercise of discretion, or when it has relied on erroneous factual or legal premises.” L.J. v. Wilbon, 633 F.3d 297, 304 (4th Cir. 2011) (alteration in original) (internal quotation marks omitted). The district court did nothing of the sort here.
Rule 60(b) states that a court “may” exercise its power to vacate a judgment under certain circumstances. The remedy though “is extraordinary and is only to be invoked upon a showing of exceptional circumstances.” Compton v. Alton S.S. Co., 608 F.2d 96, 102 (4th Cir. 1979), In determining whether to grant relief from judgment under 60(b), a district court must delicately balance “the sanctity of final judgments, expressed in the doctrine of res judicata, and the incessant command of the court’s conscience that justice be done in light of [a]ll the facts.” Id. at 102 (internal quotation marks omitted).
A district court may grant relief under Rule 60(b)(5) if “[1] the judgment has been satisfied, released or discharged; [2] it is based on an earlier judgment that has been reversed or vacated; or [3] applying it prospectively is no longer equitable.”2 In this case, the district court first rejected Welsh’s claim for relief under the rule’s “no longer equitable clause” which allows for relief from a judgment if “a significant change either in factual conditions or in law renders continued enforcement detrimental to the public interest.” Horne v. Flores, 557 U.S. 433, 447, 129 S.Ct. 2579, 174 L.Ed.2d 406 (2009) (internal quotation marks omitted). The court held that although there was a change in circumstances, the public nonetheless had a substantial countervailing interest in Welsh’s continued commitment.3 In doing so, the district court properly characterized Welsh’s argument, applied the appropriate legal standard, and considered the fact that Welsh no longer stands convicted of violating SORNA.
The district court then turned to Welsh’s claim under Rule 60(b)(5)’s second clause, which allows for relief from judgment when it is “based on an earlier judgment that has been reversed or vacated.” The district court acknowledged that it had discretion to grant Welsh relief, but noted that Welsh’s now-vacated conviction played a very minor role in the substantive decision to commit Welsh and that there was “clear and convincing evidence well beyond the mere fact of Welsh’s 2011 judgment in the District of Oregon” to support his civil commitment. J.A. 113. The court also discussed a range of factors, including Welsh’s interest in release, the courts’ interest in finality of judgments, and the public interest in Welsh’s continued confinement. It weighed the factors and (in our view) made a reasonable decision not to grant relief under Rule 60(b)(5).
Welsh argues that the district court failed to appreciate that he would never have been committed but for the now-vacated conviction. That claim, however, does no more than state the predicate for granting relief under the “reversed or vacated” provision of Rule 60(b)(5). Welsh also characterizes civil commitment as punishment for a crime. Civil commitment though is not a form of retribution, but instead aims to incapacitate. See Kansas v. Hendricks, 521 U.S. 346, 362, 117 S.Ct. 2072, 138 L.Ed.2d 501 (1997) (finding that a state civil commitment statute is “not retributive because it does not affix culpability for prior criminal conduct,” but rather “such conduct is used solely for eviden-tiary purposes, either to demonstrate that a ‘mental abnormality’ exists or to support a finding of future dangerousness”). Welsh’s allegation of unfairness—that he shouldn’t be committed because he didn’t commit a crime—can be levied against any form of civil commitment. But of course the Adam Walsh Act expressly authorizes the civil- commitment of-individuals who were never convicted of a crime. See 18 U.S.C. § 4248(a).
Welsh also says that the district court’ erred in not granting relief because he has avoided any infractions over the past year; he refused to participate in a treatment program for sex offenders only on advice of counsel; and he- would be subject to significant reporting requirements if released. But the district court considered these facts and nonetheless found a strong public interest in Welsh’s continued confinement given' the Bureau of Prisons’s forensic psychologists’ reports that (1) cast doubt on the progress Welsh had made and (2) concluded that he would “have serious difficulty refraining from acts of sexual violence or child molestation if released.” J.A. 114.
in sum, the district court weighed carefully the competing interests, in light of all the facts, and reasonably determined that Welsh should remain civilly committed. We decline to' upset the court’s considered judgment.
III.
For the reasons given, we affirm in- all respects the district court’s judgment.'
AFFIRMED
. Because Welsh does not seek relief pursuant to § 4248(g), we do not decide whether this provision could apply to someone like Welsh who was cértífíed as a sexually dangerous person before his underlying criminal conviction was dismissed.
. The court may also grant relief under Rule 60(b)(6) for "any other reason” when there are "extraordinary circumstances” and "the reason for relief from judgment does not fall within the list of enumerated reasons given in Rule 60(b)(l)-(5).” Aikens v. Ingram, 652 F.3d 496, 500 (4th Cir. 2011). Like the district court, we conclude that Rule 60(b)(6) does not apply because Welsh’s claim falls under the more specific Rule 60(b)(5).
. The dissent takes issue with the district court’s weighing of the public interest, citing to our decision in Valero Terrestrial Corp. v. Paige, where we stated that "considerations of relative fault and public interest are irrelevant to the inquiry for modification or vacatur of an injunction under Rule 60(b)(5) on the grounds of a significant change in fact or law,” 211 F.3d 112, 122 (4th Cir. 2000). The Supreme Court, however, has expressly considered the public interest in this context. See Home, 557 U.S. at 447, 129 S.Ct. 2579; Rufo v. Inmates of Suffolk Cty. Jail, 502 U.S. 367, 384, 392, 112 S.Ct. 748, 116 L.Ed.2d 867 (1992). Moreover, Rule 60(b)(5) by its terms expressly directs a district court to make an equitable determination, which by definition requires consideration of the various interests at stake. That is precisely what the district court did here.