This appeal requires us to decide whether a consent order that a state prisoner not undergo chemical castration allows him to attack his eighteen-year-old convictions a second time, notwithstanding the statute-*1323ry bar of successive petitions, 28 U.S.C. § 2244(b)(1). In 1998, a Florida jury convicted Ace Patterson of burglary, aggravated kidnapping of a child, and two counts of capital sexual battery. The trial court sentenced him to life imprisonment and chemical castration. Patterson then filed several unsuccessful collateral attacks in state court and a petition for a writ of habeas corpus that the district court dismissed as untimely. In 2009, Patterson filed a motion to correct án illegal sentence, Fla. R. Crim. P. 8.800, on the ground that the trial court failed to comply with the statutory prerequisites for chemical castration. After the state and the victim’s guardian ad litem consented to Patterson’s motion, a Florida court granted it and ordered that he not undergo chemical castration. But the Florida court did not enter a new judgment or order commanding the Secretary of the Department of Corrections to imprison him. Patterson then filed another federal petition that attacked his convictions. The district court dismissed that petition as “second or successive.” § 2244(b)(1). Patterson argues that the order that he not undergo chemical castration constitutes a new “judgment,” 28 U.S.C. § 2254(b)(1), that makes his latest petition not second or successive under Magwood v. Patterson, 561 U.S. 320, 130 S.Ct. 2788, 177 L.Ed.2d 592 (2010). But because Patterson is not “in custody pursuant to,” § 2254(b)(1), the consent order that he not undergo chemical castration, that order does not trigger a new round of federal collateral review. See Magwood, 561 U.S. at 332-33, 130 S.Ct. 2788. We affirm the dismissal of Patterson’s petition as second or successive.
I. BACKGROUND
Ace Patterson is a prisoner in the custody of the Secretary of the Florida Department of Corrections. In 1997, he visited his cousin and his cousin’s fiancée at their home in Madison County, Florida. There, the couple introduced Patterson to their eight-year-old daughter before she went to bed. Patterson ate dinner and spent time with the couple and then left for the night. But he later returned uninvited.
In the middle of the night, Patterson broke into his cousin’s home and lifted his cousin’s sleeping eight-year-old daughter out of her bed. He carried her outside, brought her to the woods, and raped her. When she tried to scream, Patterson gagged her by sticking his fingers down her throat. When she tried to escape, Patterson grabbed her leg, dragged her back into the dirt, and raped her again. After the assault, the girl found her way back home. Her parents awoke to the sound of their eight-year-old daughter knocking on the front door — crying, covered in dirt, missing a clump of hair, and covered in scratches and bruises. The medical examiners later discovered dirt in her vagina and severe vaginal lacerations.
In 1998, a jury convicted Patterson of burglary, aggravated kidnapping of a child, and two counts of capital sexual battery. The Florida trial court sentenced him to 311 months of imprisonment for the burglary and kidnapping convictions and to consecutive sentences of life imprisonment and chemical castration for the sexual battery convictions. The sentencing form “committed [Patterson] to the custody of the Department of Corrections” and directed the Department to “keep and safely imprison” Patterson for the remainder of his life. A state appellate court later affirmed his convictions and sentences. Patterson v. State, 736 So.2d 1185 (Fla. Dist. Ct. App. 1999).
Patterson then initiated a flurry of collateral attacks against his convictions, including four petitions for writs of habeas corpus in state court and an ethics complaint against the prosecutor who tried his case. His efforts failed, and a Florida ap*1324pellate court warned him that “the filing of any further successive and/or frivolous petitions or appeals may result in the imposition of sanctions.” Patterson v. State, 788 So.2d 397 (Fla. Dist. Ct. App. 2001).
In 2006, Patterson filed his first federal petition for a writ of habeas corpus. He alleged that his convictions were secured in violation of the Due Process Clause of the Fourteenth Amendment, the Self-Incrimination Clause of the Fifth Amendment, and the right to effective assistance of counsel under the Sixth Amendment. The district court dismissed his petition as untimely. Ordinarily, that decision would have brought closure to the victim of his crimes, who was by then eighteen years old.
Patterson then pursued a different line of attack. Instead of challenging his convictions, he challenged the portion of his sentence that required chemical castration. Patterson filed a motion to correct an illegal sentence, Fla. R. Crim. P. 3.80Ó, on the ground that the trial court did not comply with the statutory prerequisites for chemical castration. The State of Florida and the guardian ad litem for the victim assented to Patterson’s motion. With Patterson imprisoned for life, the prosecutor and guardian ad litem viewed chemical castration as a. “moot point” and believed that contesting his motion was not worth “exposing] the victim to the painful remembrance of the Defendant’s actions against her.”
In 2009, the Florida trial court granted Patterson’s motion in an order that stated, “[T]he Defendant shall not have to undergo [chemical castration] as previously ordered by the Court at his sentencing in the above styled matter.” The 2009 order did not vacate Patterson’s sentence and replace it with a new one. Nor did it direct the Department of . Corrections to hold Patterson or perform any affirmative act.
After his success in state court, Patterson resumed his attack on his 1998 convictions in federal court. In 2011, he filed a second petition for a writ of habeas corpus, which again alleged that his convictions were secured in violation of the Fifth, Sixth, and Fourteenth Amendments. A magistrate judge recommended dismissing Patterson’s petition as second or successive because Patterson was “not in custody pursuant to” the 2009 order. The district court adopted that recommendation and dismissed Patterson’s petition as second or successive.
A divided panel of this Court reversed. Patterson v. Sec’y, Fla. Dep’t of Corr., 812 F.3d 885 (11th Cir. 2016), reh’g en banc granted, opinion vacated, 836 F.3d 1358 (11th Cir. 2016). The panel concluded that Patterson’s petition was not second or successive because Patterson was in custody pursuant to a new judgment — the order that he not undergo chemical castration. We vacated the panel opinion and ordered rehearing en banc. We appointed Professor Erica Hashimoto to represent Patterson throughout this appeal. We thank Professor Hashimoto for her excellent brief and oral argument in keeping with the highest tradition of the legal profession.
II. STANDARD OF REVIEW
We review de novo whether a petition for a writ of habeas corpus is second or successive. Stewart v. United States, 646 F.3d 856, 858 (11th Cir. 2011).
III. DISCUSSION
After a state prisoner has had a trial, a direct appeal, and an opportunity for collateral review in the state courts, he typically gets one, and only one, chance to collaterally attack his conviction in federal court. With exceptions not relevant here, section 2244(b) prohibits a state prisoner from filing a “second or successive” habeas *1325petition. 28 U.S.C. § 2244(b). This prohibition “is grounded in respect for the finality of criminal judgments.” Calderon v. Thompson, 523 U.S. 538, 558, 118 S.Ct. 1489, 140 L.Ed.2d 728 (1998). Finality, in turn, is essential to achieving the goals of our criminal justice system: “Deterrence depends upon the expectation that ‘one violating the law will swiftly and certainly become subject to punishment, just punishment.’ Rehabilitation demands that the convicted defendant realize that ‘he is justly subject to sanction, that he stands in need of rehabilitation.’ ” Engle v. Isaac, 456 U.S. 107, 127 n.32, 102 S.Ct. 1558, 71 L.Ed.2d 783 (1982) (quoting Paul M. Bator, Finality in Criminal Law and Federal Habeas Corpus for State Prisoners, 76 Harv. L. Rev. 441, 452 (1963); Henry J. Friendly, Is Innocence Irrelevant? Collateral Attack on Criminal Judgments, 38 U. Chi. L. Rev. 142, 146 (1970)). Finality also “benefits the victim by helping [her] put the trauma of the crime and prosecution behind [her].” Presnell v. Kemp, 835 F.2d 1567, 1573 (11th Cir. 1988).
Whether a petition is second or successive depends on “the judgment challenged.” Insignares v. Sec’y, Fla. Dep’t of Corr., 755 F.3d 1273, 1278 (11th Cir. 2014). The judgment that matters for purposes of section 2244 is “the judgment authorizing the prisoner’s confinement.” Magwood, 561 U.S. at 332, 130 S.Ct. 2788 (emphasis omitted) (quoting Wilkinson v. Dotson, 544 U.S. 74, 83, 125 S.Ct. 1242, 161 L.Ed.2d 253 (2005)). This conclusion follows from the text of the statute. Section 2244(b) refers to second or successive petitions “under section 2254.” 28 U.S.C. § 2244(b). And section 2254 governs petitions that challenge “the judgment of a State court” “pursuant to” which the prisoner is “in custody.” Id. § 2254. Accordingly, the bar on second or successive petitions ordinarily prevents a prisoner from twice contesting the judgment authorizing his confinement. See Burton v. Stewart, 549 U.S. 147, 153, 127 S.Ct. 793, 166 L.Ed.2d 628 (2007).
A petition is not second or successive if it challenges a “new judgment” issued after the prisoner filed his first petition, Magwood, 561 U.S. at 324, 130 S.Ct. 2788, but the new judgment must be a “judgment authorizing the prisoner’s confinement.” Id. at 332, 130 S.Ct. 2788 (emphasis omitted) (quoting Dotson, 544 U.S. at 83, 125 S.Ct. 1242). For example, in Magwood, the district court granted a prisoner’s first habeas petition and vacated his sentence. Id. at 326, 130 S.Ct. 2788. The state court then conducted a new sentencing hearing and entered a new judgment and sentence of imprisonment. Id. When the prisoner filed a second habeas petition, the Supreme Court held that it was not second or successive because the petition was the prisoner’s first challenge to the new prison sentence. Id. at 339, 130 S.Ct. 2788. Although the prisoner’s second petition restated the same errors as his first petition, the errors he alleged were new because at the resentencing hearing, the state court heard and rejected the prisoner’s arguments a second time. Id. And “[a]n error made a second time is still a new error.” Id.
The district court correctly concluded that the only judgment that authorizes Patterson’s confinement is the sentence entered in 1998. That judgment “committed [Patterson] to the custody of the Department of Corrections,” and that commitment has never been vacated or replaced. Patterson challenged that judgment in his 2006 petition for a writ of habeas corpus.
When his first federal petition was dismissed as untimely, Patterson lost his one chance to obtain federal habeas review of his 1998 judgment. See Jordan v. Sec’y, Dep’t of Corr., 485 F.3d 1351, 1353 (11th Cir. 2007). Because Patterson’s 2011 peti*1326tion challenges the 1998 judgment a second time, the district court correctly dismissed it as second or successive. The 2009 order that granted Patterson’s uncontested motion to correct his sentence does not trigger a new round of federal review.
Our precedent in Insignares does not support Patterson’s argument. Although Patterson and Insignares both filed, successful motions to correct an illegal sentence under Florida Rule of Criminal Procedure 3.800(a), the Florida trial court in Insignares went a step further: it also changed Insignares’s term of imprisonment and “entered [a] corrected sentence and new judgment.” 755 F.3d at 1277. This corrected sentence “committed [Insig-nares] to the custody of the Department of Corrections.” Here, the Florida trial court never issued a new prison sentence — in writing or otherwise — to replace Patterson’s 1998 sentence. The 2009 order bars the imposition of chemical castration, but it does not otherwise address the term of Patterson’s imprisonment. In short, Insig-nares had an intervening “judgment authorizing [his] confinement,” but Patterson does not. Id. at 1279 (emphasis omitted) (quoting Magwood, 561 U.S. at 332, 130 S.Ct. 2788).
Patterson and the dissent contend that the 1998 sentencing form and the order that Patterson not undergo chemical castration must be read together to describe his conviction and current sentence accurately, see Dissenting Op. at 1331-32, but the text of the governing statute makes clear that the only judgment that counts for purposes of section 2244 is the judgment “pursuant to” which the prisoner is “in custody.” 28 U.S.C. § 2254; see Magwood, 561 U.S. at 332-33, 130 S.Ct. 2788; Burton, 549 U.S. at 156, 127 S.Ct. 793. And Patterson is not in custody pursuant to the 2009 order because it does not authorize anything. Magwood, 561 U.S. at 332, 130 S.Ct. 2788. Instead, it states only in the negative that Patterson “shall not have to undergo [chemical castration].” That the Florida Department of Corrections must read both forms together to determine the scope of Patterson’s confinement does not transform the 2009 order into a judgment that authorizes Patterson’s custody. The 1998 judgment is the only judgment that allows the Department to imprison Patterson. The 2009 order imposes no sentence and gives the Department no authority.
Patterson also argues that any order that alters a sentence necessarily constitutes a new judgment, but this argument is difficult to square with our precedent that suggests that not all changes to a sentence create a new judgment. We have held that when a court corrects a clerical mistake, no new judgment arises for purposes of Federal Rule of Appellate Procedure 4(B)(1)(A). See United States v. Portillo, 363 F.3d 1161, 1165-66 (11th Cir. 2004). Although we have not applied this precedent in the context of second petitions, we reject the notion that the Antiterrorism and Effective Death Penalty Act, the “central purpose” of which “was to ensure greater finality of state and federal court judgments in criminal cases,” Gonzalez v. Sec’y for Dep’t of Corr., 366 F.3d 1253, 1269 (11th Cir. 2004) (en banc), is more accommodating of untimely and successive petitions than Rule 4(b)(1)(A) is of untimely direct appeals. And, contrary to the dissent’s assertion, Dissenting Op. at 1332, because an order that corrects a clerical error likely would not create a new judgment, a petitioner would not be entitled to a second round of habeas review. See Magwood, 561 U.S. at 331, 130 S.Ct. 2788.
Recognizing that his suggested rule runs counter to Portillo, Patterson attempts to limit his test to whether a prisoner’s sentence has materially changed, but this limitation still misses the point. The relevant question is not the magnitude of the *1327change, but the issuance of a new judgment authorizing the prisoner’s confinement. Id. at. 332, 130 S.Ct. 2788. The state court did not issue a new judgment authorizing Patterson’s confinement when it granted Patterson’s motion to correct his sentence. And the 1998 judgment remains the only order that commands the Secretary to imprison Patterson.
Many ameliorative changes in sentences that state courts might grant as a matter of course, such as the removal of a fine or a restitution obligation, would trigger a new round of federal habeas review under Patterson’s proposed standard of “material change.” At oral argument, Patterson’s counsel stated that orders that remove restitution and fines might be “in a slightly different category” than orders that remove chemical castration because fines and restitution are not part of a prisoner’s custodial sentence and cannot be challenged in a habeas proceeding. See Mamone v. United States, 559 F.3d 1209, 1211 (11th Cir. 2009). But whether a challenge to the removed portion of the sentence was initially cognizable in a habeas proceeding is irrelevant to whether the removal of that condition produces a new judgment. Patterson’s focus on the magnitude and type of change to the sentence is beside the point. The only question is whether the 2009 order authorizes his confinement.
The dissent argues that, in the wake of our ruling, “all Florida prisoners who obtain a favorable Rule 3.800(a) order striking or vacating part of their initial sentence ... will simply have the state trial court enter a new judgment,” Dissenting Op. at 1331, but the dissent cites no authority for this proposition. And it is unclear that Florida law would entitle every prisoner to that remedy. Rule 3.800(a) allows a court to correct an illegal sentence “at any time” if the “records demonstrate on their face an entitlement” to relief. This rule encompasses clerical errors, Carson v. State, 489 So.2d 1236, 1238 (Fla. Dist. Ct. App. 1986), which “generally relate back” to the date of initial judgment. R. R. Ricou & Sons Co. v. Merwin, 94 Fla. 86, 113 So. 745, 746 (1927). An order that relates back to an original sentence merely amends the original order and may not entitle' the defendant to vacatur of the original judgment and entry of a new one. That Rule 3.800(a) encompasses clerical errors, which relate back, suggests that other modifications under Rule 3.800(a) may also relate back to the original sentencing and would not require a judge to vacate the original sen•tence and issue a new one. And we know, of course, that the judge in Patterson’s case did not do so.
As a practical matter, Patterson’s proposed resolution of this appeal might hurt prisoners more than it helps. To be sure, if any change to a sentence triggers another opportunity for federal review, state prisoners would potentially have greater access to the federal writ of habeas corpus. But then state officials' would be less willing to agree to sentencing changes that benefit prisoners, and state courts would be more hesitant to approve them. Courts have the discretion to accept a prosecutor’s concession, in lieu of reaching the merits, in close cases and in cases where no error occurred. See Casey v. United States, 343 U.S. 808, 808, 72 S.Ct. 999, 96 L.Ed. 1317 (1952); Santiago-Lugo v. Warden, 785 F.3d 467, 475 (11th Cir. 2015). But Florida’s courts “have a constitutional and statutory duty not to accept an inappropriate concession” when it “might be to the detriment of the victims of crime and/or to the people of the State of Florida,” Reed v. State, 783 So.2d 1192, 1196 n.2 (Fla. Dist. Ot. App. 2001), quashed on other grounds, 837 So.2d 366 (Fla. 2002), a possibility that would arise more often if a merciful concession required prosecutors to defend and victims *1328to endure a new round of federal habeas review.
The dissent contends that we “seem[ ] to be saying” that prosecutors and state courts would refuse to correct illegal sentences under clear state law to avoid additional federal habeas review, see Dissenting Op. at 1332-38, but that contention constructs a straw man. Nothing in our analysis suggests that prosecutors and state courts would refuse to modify an illegal sentence. Instead, our analysis recognizes that prosecutors may sometimes consent to motions under Rule 3.800(a) even when the prisoner’s sentence may not be illegal. Here, the record establishes that the prosecution assented to Patterson’s motion to remove chemical castration from his sentence because it viewed chemical castration as a “moot point” in the light of Patterson’s life sentence and because contesting the motion was not worth “exposing] the victim to the painful remembrance of [Patterson’s] actions against her.” But we doubt that the prosecution would have so readily assented to Patterson’s motion had it known that the resulting order would subject Patterson’s victim to a second round of lengthy habeas review.
The Antiterrorism and Effective Death Penalty Act gives state prisoners only one opportunity to challenge their sentence in federal court. Patterson wasted that opportunity ten years ago when he filed his first petition late. Patterson would have us hold that any order that changes a prisoner’s sentence is a new judgment that triggers a new round of federal review. But the only judgment that matters is the judgment that authorizes Patterson’s confinement — the very judgment that Patterson has been attacking for eighteen years and that he wants to attack again. The Act requires that we say “no more.” The ciis-trict court correctly dismissed Patterson’s petition as second or successive.
IY. CONCLUSION
We AFFIRM the dismissal of .Patterson’s petition for a writ of habeas corpus.