
599 F.3d 976 (2010)
Steven Ray BAILEY, Petitioner-Appellant,
v.
Jean HILL, Respondent-Appellee.
No. 09-35450.
United States Court of Appeals, Ninth Circuit.
Argued and Submitted February 2, 2010.
Filed March 25, 2010.
*977 Nell Brown, Assistant Federal Public Defender, Federal Public Defender's Office, Portland, OR, for petitioner-appellant Steven Ray Bailey.
Carolyn Alexander (argued), Assistant Attorney General, and Cecil A. Reniche-Smith, Assistant Attorney General, Oregon Department of Justice, Salem, OR, for respondent-appellee Jean Hill.
Before PAMELA ANN RYMER, RONALD M. GOULD and JAY S. BYBEE, Circuit Judges.
GOULD, Circuit Judge:
Steven Ray Bailey, an Oregon state prisoner, appeals the district court's denial of his habeas corpus petition, brought pursuant to 28 U.S.C. § 2254, challenging the state court's restitution order entered after Bailey's guilty plea to kidnapping and attempted assault. The district court denied Bailey's habeas petition and dismissed his case concluding that Bailey did not meet the "in custody" requirement of § 2254 because he challenged only the restitution order and, alternatively, because Bailey did not exhaust his state court remedies. We have jurisdiction under 28 U.S.C. § 1291, and we affirm.

I
In 2002 Steven Ray Bailey was indicted in Oregon state court on several counts arising from an armed confrontation involving him earlier that year. A settlement was reached and Bailey pleaded guilty to kidnapping and attempted assault. The settlement specified a total term of incarceration of 160 months. At a February 14, 2003, hearing, the state court ordered the State to file a restitution schedule within two weeks. On March 4, 2003, more than two weeks later, the State filed its restitution schedule seeking $6,606.65 for "crime victim compensation" and medical bills. Bailey's counsel did not object to the restitution schedule and on March 13, 2003, the state court filed an amended judgment,[1] ordering Bailey to pay restitution in connection with the attempted assault charge.
*978 Bailey sought post-conviction relief in the state court claiming, in relevant part, that he was denied effective assistance of counsel in violation of his Sixth Amendment rights on the basis of his counsel's failure to object to the imposition of restitution as part of his sentence. The state court denied post-conviction relief and Bailey appealed to the Oregon Court of Appeals. The Oregon Court of Appeals rejected Bailey's appeal and the Oregon Supreme Court denied review.
Bailey thereafter filed a petition for a writ of habeas corpus pursuant to 28 U.S.C. § 2254 in the United States District Court for the District of Oregon, arguing that his counsel provided ineffective assistance by not objecting to the imposition of restitution. The district court denied Bailey's habeas petition after concluding that it lacked jurisdiction over Bailey's petition because Bailey did not meet § 2254(a)'s "in custody" requirement when he challenged only the restitution order, and that, in the alternative, Bailey did not exhaust his state court remedies. The district court dismissed Bailey's case on that basis. Bailey timely appeals the district court's order.

II
We review de novo a district court's decision to deny a petition for habeas corpus. Gonzalez v. Brown, 585 F.3d 1202, 1206 (9th Cir.2009). We review de novo a district court's determination that it does not have subject-matter jurisdiction over a habeas corpus petition. Puri v. Gonzales, 464 F.3d 1038, 1040 (9th Cir. 2006).[2]

III
We may not reach the merits of Bailey's habeas corpus claim unless we conclude that the district court had jurisdiction over Bailey's habeas corpus petition. See Wilson v. Belleque, 554 F.3d 816, 821 (9th Cir.2009).
28 U.S.C. § 2254(a) states:
The Supreme Court, a Justice thereof, a circuit judge, or a district court shall entertain an application for a writ of habeas corpus in behalf of a person in custody pursuant to the judgment of a State court only on the ground that he is in custody in violation of the Constitution or laws or treaties of the United States.
Section 2254(a)'s "in custody" requirement is jurisdictional and therefore "it is the first question we must consider." See Williamson v. Gregoire, 151 F.3d 1180, 1182 (9th Cir.1998) (stating the same as to 28 U.S.C. § 2241's "in custody" requirement).
We note that § 2254(a) deploys the term "in custody" twice. The first requirement is that the petition be filed "in behalf of a person in custody," and the second is that the application for the writ of habeas corpus can only be entertained "on the ground that [the petitioner] is in custody in violation of the Constitution or laws or treaties of the United States." 28 U.S.C. § 2254(a). Although the precedents that we review herein generally speak of the "in custody" requirement, it can be seen literally that this statutory requirement has two distinct aspects.
Section 2254(a)'s "in custody" requirement "has been interpreted to mean that federal courts lack jurisdiction over habeas corpus petitions unless the petitioner *979 is 'under the conviction or sentence under attack at the time his petition is filed.'" Resendiz v. Kovensky, 416 F.3d 952, 956 (9th Cir.2005) (quoting Maleng v. Cook, 490 U.S. 488, 490-91, 109 S.Ct. 1923, 104 L.Ed.2d 540 (1989) (per curiam)). The petitioner must be in custody at the time that the petition is filed, see Carafas v. LaVallee, 391 U.S. 234, 238, 88 S.Ct. 1556, 20 L.Ed.2d 554 (1968), but the petitioner's "subsequent release from custody does not itself deprive the federal habeas court of its statutory jurisdiction." Tyars v. Finner, 709 F.2d 1274, 1279 (9th Cir.1983). Physical custody is not indispensable to confer jurisdiction. "History, usage, and precedent can leave no doubt that, besides physical imprisonment, there are other restraints on a man's liberty, restraints not shared by the public generally, which have been thought sufficient in the English-speaking world to support the issuance of habeas corpus." Jones v. Cunningham, 371 U.S. 236, 240, 83 S.Ct. 373, 9 L.Ed.2d 285 (1963). "[T]he boundary that limits the `in custody' requirement is the line between a `restraint on liberty' and a `collateral consequence of a conviction.'" Williamson, 151 F.3d at 1183-84 (holding that a habeas petitioner challenging Washington's sex-offender registration law did not meet the "in custody" requirement because the law did not impose a significant restraint on the petitioner's liberty).
These above precedents go to the first statutory use of "in custody," as courts assess whether there is a sufficient liberty restraint to consider a person as being "in custody." However, the second use of "in custody" in the statute requires literally that the person applying for the writ is contending that he is "in custody" in violation of the Constitution or other federal laws. Because in this case Bailey was in physical custody in state prison when he launched his habeas petition challenge to the restitution portion of his sentence, our primary focus is on the statute's second "in custody" requirement and whether Bailey is contending that his custody offends federal law.

A
We have repeatedly recognized that the imposition of a fine, by itself, is not sufficient to meet § 2254's jurisdictional requirements. Williamson v. Gregoire, 151 F.3d 1180, 1183 (9th Cir.1998) ("[C]ourts hold that the imposition of a fine or the revocation of a license is merely a collateral consequence of conviction, and does not meet the `in custody' requirement.") (gathering cases); see also Dremann v. Francis, 828 F.2d 6, 7 (9th Cir. 1987) (per curiam) (concluding that a lawyer's non-compliance with a "fine only" sentence that raised the threat of "possible imminent incarceration" was insufficient to confer habeas jurisdiction). Liability under a restitution order is "like a fine-only conviction" and "is not a serious restraint on . . . liberty as to warrant habeas relief." Tinder v. Paula, 725 F.2d 801, 805 (1st Cir.1984); see also Obado v. New Jersey, 328 F.3d 716, 718 (3d Cir.2003) ("The payment of restitution . . ., absent more, is not the sort of `significant restraint on liberty' contemplated in the `custody' requirement. . . ."). Bailey does not argue, nor could he successfully do so in light of these precedents, that the payment of restitution alone is a significant restraint on his liberty.
Instead, Bailey argues that unlike the petitioners in Williamson, Dremann, Tinder, and Obado, Bailey is challenging the restitution order while physically in custody, and this additional fact, he argues, alters his petition from one not cognizable by the courts to one that is. Thus the question for us resolves to whether Bailey's physical custody when he filed his habeas petition, alone, permits him to challenge a restitution order via that habeas *980 corpus petition. Stated another way, the key issue is whether a challenge to a restitution order by a custodial state prisoner who does not challenge the lawfulness of his custody under federal law is sufficient for jurisdiction under the federal habeas statute 28 U.S.C. § 2254.
Bailey's reliance on his physical custody is misplaced. The plain meaning of the text of § 2254(a) makes clear that physical custody alone is insufficient to confer jurisdiction. Section 2254(a)'s language permitting a habeas petition to be entertained "only on the ground that [the petitioner] is in custody in violation of the Constitution or laws or treaties of the United States," (emphasis added), explicitly requires a nexus between the petitioner's claim and the unlawful nature of the custody. See Dickerson v. United States, 530 U.S. 428, 439 n. 3, 120 S.Ct. 2326, 147 L.Ed.2d 405 (2000) ("Habeas corpus proceedings are available only for claims that a person `is in custody in violation of the Constitution or laws or treaties of the United States.'" (quoting 28 U.S.C. § 2254(a))).
The United States Supreme Court has declared that where a statute does not define its terms, and here that might be said about the statutory phrase "in custody in violation of the Constitution or laws or treaties of the United States," we are to give such a phrase its ordinary or natural meaning. See Johnson v. United States, ___ U.S. ___, 130 S.Ct. 1265, 1269-70, ___ L.Ed.2d ___ (2010); Bailey v. United States, 516 U.S. 137, 144-45, 116 S.Ct. 501, 133 L.Ed.2d 472 (1995). Giving the crucial statutory phrase within § 2254(a) its ordinary, natural meaning, we cannot but conclude that to sustain his habeas challenge, Bailey must show that his custody in itself, or its conditions, offends federal law. It is not enough for Bailey to say, in substance, my custody is okay and consistent with federal law, but I should not be burdened by this restitution requirement. What Bailey is required to pay in restitution is not by ordinary meaning a part of his custody.
The Supreme Court, construing § 2254(a)'s "in custody" requirement, has recognized that its purpose is to permit petitions only when the remedy sought is capable of alleviating severe restraints on individual liberty:
The custody requirement of the habeas corpus statute is designed to preserve the writ of habeas corpus as a remedy for severe restraints on individual liberty. Since habeas corpus is an extraordinary remedy whose operation is to a large extent uninhibited by traditional rules of finality and federalism, its use has been limited to cases of special urgency, leaving more conventional remedies for cases in which the restraints on liberty are neither severe nor immediate.
Hensley v. Mun. Court, 411 U.S. 345, 351, 93 S.Ct. 1571, 36 L.Ed.2d 294 (1973) (emphasis added). Commentators have also taken note of § 2254(a)'s requirement of a nexus between the petitioner's claim and the unlawful nature of the custody. See 1 Randy Hertz & James S. Liebman, Federal Habeas Corpus Practice and Procedure § 9.1, at 437-38 & n. 2 (5th ed.2005) (stating that habeas corpus jurisdiction under § 2254(a) requires that "the substance of the claim being asserted . . . must challenge the legality of custody on the ground that it is, or was imposed, `in violation of the Constitution or laws or treaties of the United States'" (quoting 28 U.S.C. § 2254(a))); id. at 438 & n. 6 (concluding that habeas corpus "[c]laims that do not `call into question the lawfulness of conviction or confinement' or challenge the fact, length, or conditions of the petitioner's custody or `seek immediate or speedier release'" are not cognizable (quoting Heck *981 v. Humphrey, 512 U.S. 477, 481-83, 114 S.Ct. 2364, 129 L.Ed.2d 383 (1994))).
Bailey's challenge to the restitution order lacks any nexus, as required by the plain text of § 2254(a), to his custody. While Bailey's liberty has been severely restrained by his conviction and custodial sentence, the remedy that Bailey seeks, the elimination or alteration of a money judgment, does not directly impactand is not directed at the source of the restraint onhis liberty. If successful, Bailey could reduce his liability for restitution but would still have to serve the rest of his custodial sentence in the same manner; his remedy would affect only the fact or quantity of the restitution that he has to pay to the victim. Bailey's argument is only that he has been ordered to pay restitution "in violation of the Constitution or laws or treaties of the United States," 28 U.S.C. § 2254(a), and not that his custody is unlawful. That he is in physical custody while attacking the restitution order is insufficient to confer jurisdiction over his habeas petition.

B
Our construction of § 2254(a)'s plain meaning is in accord with the Seventh Circuit's constructionthe only circuit to have addressed the issue before us on this appeal.
In Virsnieks v. Smith, 521 F.3d 707 (7th Cir.2008), the Seventh Circuit examined the plain text of § 2254(a) and concluded that its language precludes courts from reviewing a challenge to a non-custodial portion of a criminal sentence:
Section 2254 authorizes federal courts to "entertain an application for a writ of habeas corpus in behalf of a person in custody pursuant to the judgment of a State court only on the ground that he is in custody in violation of the Constitution or laws or treaties of the United States." 28 U.S.C. § 2254(a) (emphasis added). The plain language of the statute therefore commands that courts entertain habeas petitions "only" on the ground that a prisoner is "in custody," and, by linking a court's ability to entertain a habeas petition to the particular relief sought, the language of the statute prevents consideration of pendent challenges.
Id. at 721. The Seventh Circuit thus held that a petitioner's constitutional challenge brought under § 2254 to the noncustodial component of his sentencethat the petitioner register as a sex offenderwas insufficient to create a cognizable claim. Id. at 717, 722.
Building on that premise, the Seventh Circuit subsequently addressed the issue raised in this appealwhether a state habeas petitioner's Sixth Amendment challenge to a restitution order, brought pursuant to § 2254, is cognizable. See Washington v. Smith, 564 F.3d 1350, 1350 (7th Cir.2009). In Washington, the Seventh Circuit, applying persuasive reasoning, concluded that such a claim is not cognizable under § 2254:
There is no question that Washington was in custody pursuant to a state court judgment when he filed his petition: he was serving his two and a half year sentence of imprisonment and, according to our docket, still is. But Washington's petitionat least the claim certified for appealattacks only the calculation of the amount he owes in restitution. In Barnickel v. United States, 113 F.3d 704 (7th Cir.1997), this court ruled that a § 2255 motionthe federal prisoner's equivalent to a § 2254 petition attacking a criminal judgment entered by a state courtis unavailable to challenge a restitution order imposed as part of a criminal sentence. Id. at 706[.] Washington couches his claim in the sixth amendment and, thus, adequately alleges a constitutional violation. But should he win, the only possible benefit to him will *982 be a lower payment to his victim; he will still be obligated to serve two and a half years in prison and three years on supervision. Washington's attack on counsel's handling of the restitution amount simply does not state a cognizable claim for relief under § 2254.
Id. at 1351 (internal citation omitted).
We agree with the Seventh Circuit's approach and conclude that § 2254(a) does not confer jurisdiction over a state prisoner's in-custody challenge to a restitution order imposed as part of a criminal sentence.

C
Our conclusion is reinforced by our decisions holding that federal prisoners may not collaterally attack restitution orders under 28 U.S.C. § 2255the federal counterpart to § 2254. In United States v. Kramer, 195 F.3d 1129 (9th Cir.1999), we held that a federal prisoner cannot challenge a restitution order on constitutional grounds under § 2255 because "by its plain terms, § 2255 is available only to defendants who are in custody and claiming the right to be released." Id. at 1130. In United States v. Thiele, 314 F.3d 399 (9th Cir.2002), extending Kramer, we held that a federal prisoner could not, under § 2255, use his physical custody and the fact that he was seeking release from custody on other grounds to "run interference for non-cognizable [restitution] claims." Id. at 402.
Bailey argues that textual differences between §§ 2254(a) and 2255(a) compel the conclusion that Thiele's and Kramer's reasoning should not apply to a state prisoner's challenge to a restitution order brought under § 2254. We disagree. The import of the textual differences between § 2254(a) and § 2255(a), as they pertain to this case, is that § 2254(a), but not § 2255(a), permits a challenge to the execution of a custodial sentence.[3]See White v. Lambert, 370 F.3d 1002, 1009 (9th Cir. 2004) (explaining that "28 U.S.C. § 2255, the federal counterpart to § 2254, is expressly written to prevent attacks on the execution of the sentence" and describing challenges to the execution of a sentence to include "`challenges ... that implicate the fact or duration of confinement but do not stem from the original conviction or sentence'" (emphasis added) (quoting Walker v. O'Brien, 216 F.3d 626, 632-33 (7th Cir.2000))).[4] This difference is immaterial here because an attack on a restitution *983 order is not an attack on the execution of a custodial sentence.[5] As applied to the issue presented to us, §§ 2254(a) and 2255(a) are sufficiently analogous that Thiele and Kramer support our conclusion that § 2254(a) does not confer jurisdiction over a challenge to a restitution order. Certainly, nothing in these statutory differences would prompt us to disregard the plain language of § 2254(a) and permit a federal court challenge by a state prisoner that was not premised on his or her custody being in violation of federal law.

D
Bailey directs us to several federal case authorities that he contends support his view that § 2254(a) confers jurisdiction to a state prisoner's collateral attack upon a restitution order. All of the cases that he cites involved a prisoner who, unlike Bailey, contended that the custody itself violated the Constitution or other federal law. Accordingly, the particular sentences or snippets of these opinions on which Bailey rests his jurisdictional argument are merely dicta. None of the cases can persuade us to disregard the plain language of § 2254(a) with its requirement that a state prisoner asserting a habeas claim, for jurisdiction, must allege that his or her custody is in violation of federal law. None persuade us to part company with the Seventh Circuit and create a circuit split by interpreting § 2254(a) in a non-literal manner.[6]
*984 Given the plain text of § 2254(a), and consistent with the Seventh Circuit's decision in Washington v. Smith, 564 F.3d 1350 (7th Cir.2009), and our reasoning in United States v. Thiele, 314 F.3d 399 (9th Cir.2002), and United States v. Kramer, 195 F.3d 1129 (9th Cir.1999), we hold that § 2254(a) does not confer jurisdiction over a habeas corpus petition raising an in-custody challenge to a restitution order.[7]

IV
Because courts do not have jurisdiction over a habeas corpus petition brought pursuant to § 2254 challenging only a restitution order, the district court lacked jurisdiction over Bailey's habeas petition. The district court's order denying Bailey's petition for habeas corpus and dismissing his case is
AFFIRMED.
NOTES
[1]  A second amended judgment dated August 25, 2003, was subsequently filed reflecting that Bailey had been convicted of attempted assault rather than the completed crime of assault as indicated in the first amended judgment.
[2]  Although the district court concluded that it did not have jurisdiction, the district court denied Bailey's petition rather than dismiss it, and the district court subsequently dismissed the case. Our review is de novo, and ultimately we are reviewing the dismissal of the case.
[3]  The main textual differences between §§ 2254(a) and 2255(a) are the provisions' descriptions of the claims that courts are authorized to entertain: § 2254(a) refers to claims that the petitioner is "in custody pursuant to the judgment of a State court ... in violation of [federal law]" whereas § 2255(a) refers to claims that the federal prisoner has "the right to be released upon the ground that the sentence was imposed in violation of [federal law]."
[4]  Bailey notes our statement in White that "[§ 2254's `in custody pursuant to the judgment of a State court'] clause ... direct[s] a status inquiry into the source of the petitioner's custody, and not an inquiry into the target of the petitioner's challenge." 370 F.3d at 1007-08. Bailey urges that because the source of his custody is a state court judgment, it is irrelevant that the target of his challenge is the restitution order. Bailey misunderstands our discussion in White. There, we were faced with the question of whether a state prisoner who challenges a prison transfer but who does not challenge the underlying state court judgment, can file a petition pursuant to § 2241 or whether the petitioner must proceed under § 2254. Id. at 1005. We concluded that because the source of the petitioner's custody was the state court judgment, § 2254, and not § 2241, applied. Id. at 1005, 1009-10. We had no opportunity in White to pass on the issue presented in this appeal, whether a challenge to a restitution order by a custodial state prisoner who does not challenge the lawfulness of custody under federal law is sufficient to support jurisdiction under the federal habeas statute of § 2254.
[5]  Bailey notes that the restitution order is part of his sentence imposed by the amended judgment. That the restitution order is contained in the same judgment that delivers Bailey's custodial sentence does not show that Bailey is claiming that his custody is in violation of federal law.
[6]  First, Bailey urges that the Supreme Court established in Carafas v. LaVallee, 391 U.S. 234, 88 S.Ct. 1556, 20 L.Ed.2d 554 (1968), that "the [habeas] statute does not limit the relief that may be granted to discharge of the applicant from physical custody." Id. 239, 88 S.Ct. 1556. In Carafas, the petitioner challenged his conviction in a habeas petition that he filed while he was incarcerated, establishing the district court's jurisdiction. Id. at 236, 88 S.Ct. 1556. The petitioner's sentence, however, expired during the petitioner's appeal. Id. The Court concluded that the case was not moot because the petitioner, though no longer in custody, was still burdened by the "consequences of his conviction," id. at 237, 88 S.Ct. 1556, and that jurisdiction was not defeated under those circumstances, id. at 238, 88 S.Ct. 1556. Nothing in Carafas suggests that habeas corpus jurisdiction can be established, in the first instance, through a challenge to a restitution order that is not joined with a challenge to the lawfulness of custody under federal law.

Second, Bailey relies on a passage from Maleng v. Cook, 490 U.S. 488, 109 S.Ct. 1923, 104 L.Ed.2d 540 (1989) (per curiam), stating that § 2254(a) "requir[es] that the habeas petitioner be `in custody' under the conviction or sentence under attack at the time his [or her] petition is filed." Id. at 490-91, 109 S.Ct. 1923 (citing Carafas, 391 U.S. at 238, 88 S.Ct. 1556). Bailey was in physical custody when he attacked the restitution order, but he was not "in custody" under the restitution order, the target of his attack.
Third, Bailey points to Spencer v. Kemna, 523 U.S. 1, 118 S.Ct. 978, 140 L.Ed.2d 43 (1998), reciting that the petitioner "was incarcerated by reason of the parole revocation at the time the petition was filed, which is all the `in custody' provision of 28 U.S.C. § 2254 requires." Id. at 7, 118 S.Ct. 978 (citing Carafas and Maleng). But in Spencer, the petitioner was attacking the parole revocation on due process grounds, which necessarily meant he was attacking the source of his incarceration, id. at 4-5, 118 S.Ct. 978, and thus was claiming that his incarceration violated federal law. This is not so here.
Fourth, Bailey quotes a sentence from Abdala v. INS, 488 F.3d 1061 (9th Cir.2007), where we cited Spencer for the proposition that "the `in custody' provision of 28 U.S.C. § 2254 requires only that a petitioner be incarcerated... at the time a habeas petition is filed." Id. at 1064. We think implicit in this sentence, or alternatively not considered at all in that case, is the literal statutory limitation that a petitioner must make a claim that he or she is in custody in violation of the law, see 28 U.S.C. §§ 2241(c), 2254(a), as the petitioner there clearly did by challenging his detention at an INS facility on statutory and due process grounds, see 488 F.3d at 1063. Bailey makes no such claim.
[7]  Because there is no habeas jurisdiction, we do not reach or decide Bailey's remaining arguments or the merits of Bailey's petition.
