
638 F.3d 1303 (2011)
Ortino LICON, Petitioner-Appellant,
v.
H.A. LEDEZMA, Warden, Respondent-Appellee.
No. 10-6166.
United States Court of Appeals, Tenth Circuit.
March 30, 2011.
*1305 Ortino Licon, Pro Se.
Before HARTZ, ANDERSON, and TYMKOVICH, Circuit Judges.[*]
TYMKOVICH, Circuit Judge.
Ortino Licon challenges a Bureau of Prisons (BOP) policy and regulation that denies him eligibility for an early release program because he was convicted of felon in possession charges. The BOP has authority to reduce a nonviolent offender's term of imprisonment upon successful completion of a drug rehabilitation program. The challenged BOP policy categorically denies prisoners convicted of felon in possession charges eligibility for the early release benefit. Licon contends the policy arbitrarily categorizes every inmate convicted of firearm possession charges as violent offenders. We conclude the BOP's policy is not arbitrary, and therefore the BOP acted within its discretion by excluding inmates convicted of felon in possession charges.
Having jurisdiction pursuant to 28 U.S.C. § 1291, we AFFIRM the district court's decision.

I. Background
Licon pleaded guilty to a federal charge of felon in possession of a firearm in Texas. He was sentenced to 188 months' imprisonment, which he is currently serving at a federal facility in Oklahoma. While serving his term, Licon sought admission to the prison's Residential Drug Abuse Program (RDAP). By statute, the BOP may grant a sentence reduction upon successful completion of the RDAP.
During the application process, Licon was advised by an RDAP administrator that, pursuant to BOP regulation, he would not be eligible for early release even if he did complete the program. BOP policy excluded prisoners with felon in possession convictions from receiving the sentence reduction.
In response to his ineligibility, Licon brought a habeas petition in federal district court challenging the regulation. In a carefully reasoned report, the magistrate judge recommended Licon's petition be denied, concluding the eligibility standards did not affront statutory or constitutional requirements. The district court adopted the magistrate judge's recommendation and denied the petition.

II. Discussion
Licon contends the program's eligibility requirements are arbitrary and capricious, and the district court erred in denying his petition for relief. We review the district court's denial of habeas corpus relief de novo and review findings of fact for clear error. United States v. Eccleston, 521 F.3d 1249, 1253 (10th Cir.2008). Because Licon is proceeding pro se, we *1306 construe his filings liberally. See Van Deelen v. Johnson, 497 F.3d 1151, 1153 n. 1 (10th Cir.2007).

A. The BOP Regulation
The regulation Licon challenges has a long pedigree. The regulation finds its statutory basis in 18 U.S.C. § 3621(e)(2)(B) (1994), which empowers the BOP to reduce the sentence of a federal prisoner convicted of a "nonviolent offense" by up to one year if the prisoner successfully completes a substance abuse treatment program.[1] But the statute does not define the term "nonviolent offense." Accordingly, in 1995, the BOP published an implementing rule and regulation providing eligibility standards. Specifically, the new regulation provided that prisoners would not be eligible for early release if convicted of a "crime of violence as defined in 18 U.S.C. § 924(c)(3)." 28 C.F.R. § 550.58 (1995). To clarify its regulation, the BOP subsequently issued a Program Statement declaring that "crimes of violence" included, in relevant part, drug trafficking convictions under 21 U.S.C. § 841 that involved possession of a firearm and felon in possession convictions under 18 U.S.C. § 922(g). Program Statement No. 5162.02, § 9 (July 24, 1995).[2]
Legal challenges to the eligibility rule and Program Statement resulted in a circuit split. The majority of courts facing the question, including our own, held the rule was invalid as applied by the Program Statement. We concluded drug trafficking with a sentencing enhancement for possession of a firearm could not be considered a "crime of violence" because our prior cases had found drug trafficking to be nonviolent within the meaning of § 924(c)(3). Fristoe v. Thompson, 144 F.3d 627, 631 (10th Cir. 1998). We further found the BOP's reliance on a sentencing factor in support of its policy violated the plain language of § 3621(e)(2)(B), which excludes prisoners "convicted of a nonviolent offense." Id. (emphasis added). Other circuits reached the same conclusion. See, e.g., Martin v. Gerlinski, 133 F.3d 1076, 1079-81 (8th Cir. 1998); Bush v. Pitzer, 133 F.3d 455, 456-57 (7th Cir.1997); Roussos v. Menifee, 122 F.3d 159, 161-64 (3d Cir.1997); Downey v. Crabtree, 100 F.3d 662, 669 (9th Cir.1996).
Several circuits reached a contrary conclusion, finding the BOP's interpretation of the term "nonviolent crime" was reasonable, either because this reading was consistent with prior judicial interpretations of § 924(c)(3), see, e.g., Cook v. Wiley, 208 F.3d 1314, 1322 (11th Cir.2000), or because of the dangerous nature of firearms, see, e.g., Pelissero v. Thompson, 170 F.3d 442, 447 (4th Cir.1999). In response to the circuit split, the BOP issued an amended interim rule clarifying its position. The amended rule categorically excluded from early release inmates convicted of a felony "[t]hat involved the carrying, possession, or use of a firearm or other dangerous weapon or explosives." 28 C.F.R. § 550.58(a)(1)(vi)(B) (1997). But this rule did not purport to rely on the statutory exclusion for "crimes of violence." Instead, the rule based its authority on the *1307 discretion allotted to the BOP Director to grant a sentencing reduction. 62 Fed.Reg. 53690, 53690 (Oct. 15, 1997). The BOP explained, "even as the Bureau concedes that offenses related to this regulation are `non-violent' offenses, the implementing statute does not mandate that all `non-violent' offenders must receive an early release. The statute merely indicates that the sentence may be reduced by the Bureau of Prisons." 65 Fed.Reg. 80745, 80747 (Dec. 22, 2000).
The amended rule provoked a second divide in the circuit courts, this time over the question of whether the categorical exclusion was a permissible exercise of the BOP's discretion to reduce sentences. Compare Bellis v. Davis, 186 F.3d 1092, 1095 (8th Cir.1999) (holding the new rule was a valid exercise of BOP discretion), and Bowen v. Hood, 202 F.3d 1211, 1220 (9th Cir.2000) (same), with Ward v. Booker, 202 F.3d 1249, 1256-57 (10th Cir.2000) (reaching the opposite result), and Kilpatrick v. Houston, 197 F.3d 1134, 1135 (11th Cir.1999) (same).
The Supreme Court granted certiorari and resolved the conflict in Lopez v. Davis, 531 U.S. 230, 121 S.Ct. 714, 148 L.Ed.2d 635 (2001). There, the Court held § 3621(e)(2)(B) granted the BOP discretion to categorically deny early release eligibility to certain classes of inmates. The Court further found a rule excluding felons in possession of a weapon was a permissible exercise of that discretion:
Having decided that the Bureau may categorically exclude prisoners based on their preconviction conduct, we further hold that the regulation excluding Lopez is permissible. The Bureau reasonably concluded that an inmate's prior involvement with firearms, in connection with the commission of a felony, suggests his readiness to resort to life-endangering violence and therefore appropriately determines the early release decision.
Id. at 244, 121 S.Ct. 714.
The 1997 interim rule became final without change in 2000. 28 C.F.R. § 550.58(a)(1)(vi)(B) (2000). The rule was again modified in 2009, which, as we discuss further below, confirmed the categorical exclusion of felons in possession reasonably implements § 3621.

B. Licon's Challenge
Licon contends the BOP rule is arbitrary and capricious under 5 U.S.C. § 706(2)(A) of the Administrative Procedure Act (APA). Licon also argues this inadequacy rises to the level of a due process violation. Finally, he claims the government committed fraud in offering him the possibility of a sentence reduction based on RDAP in his plea agreement for which he was ineligible.[3]

1. Regularity of Agency Action
Licon first contends the BOP acted arbitrarily in enacting the regulation. He asserts the BOP failed to articulate a legally adequate rationale for its decision to categorically exclude certain offenders. We disagree.
The APA requires a reviewing court to set aside final agency action that is "arbitrary, capricious, an abuse of discretion, or otherwise not in accordance with the law." § 706(2)(A). Under this deferential standard, we must consider "whether the disputed decision was based on consideration of the relevant factors and whether there has been a clear error of judgment." Utah Envtl. Cong. v. Dale Bosworth, 443 F.3d 732, 739 (10th Cir. *1308 2006). An agency rule is arbitrary and capricious if the agency
relied on factors which Congress had not intended it to consider, entirely failed to consider an important aspect of the problem, offered an explanation for its decision that runs counter to the evidence before the agency, or is so implausible that it could not be ascribed to a difference in view or the product of agency expertise.
National Ass'n of Home Builders v. Defenders of Wildlife, 551 U.S. 644, 658, 127 S.Ct. 2518, 168 L.Ed.2d 467 (2007) (quoting Motor Vehicle Mfrs. Ass'n v. State Farm Mut. Auto. Ins. Co., 463 U.S. 29, 43, 103 S.Ct. 2856, 77 L.Ed.2d 443 (1983)).
In reviewing a regulation under this standard of review, "it is well-established that an agency's action must be upheld, if at all, on the basis articulated by the agency itself." Colorado Wild, Heartwood v. U.S. Forest Service, 435 F.3d 1204, 1213 (10th Cir.2006) (quoting Motor Vehicle Mfrs., 463 U.S. at 50, 103 S.Ct. 2856). We will "uphold a decision of less than ideal clarity if the agency's path may reasonably be discerned." National Ass'n of Home Builders, 551 U.S. at 658, 127 S.Ct. 2518 (quoting Bowman Transp., Inc. v. Arkansas-Best Freight Sys., Inc., 419 U.S. 281, 286, 95 S.Ct. 438, 42 L.Ed.2d 447 (1974)). But we cannot accept appellate counsel's post hoc rationalizations for agency action. Colorado Wild, Heartwood, 435 F.3d at 1213.
Licon's arbitrariness argument is not entirely without merit. He points to a decision of the Ninth Circuit, Arrington v. Daniels, 516 F.3d 1106 (9th Cir.2008), which indeed held that § 550.58(a)(1)(vi)(B) (2000) was arbitrary and capricious. The court concluded the BOP had "failed to set forth a rationale for its decision to categorically exclude prisoners convicted of [firearm possession] offenses" that was not arbitrary. Id. at 1114. The BOP had offered two rationales to justify the rule. The first, that firearm offenders pose an increased risk to public safety, was rejected by the court as a post hoc rationalization because this theory was "entirely absent from the administrative record." Id. at 1113. The court acknowledged the second rationale, that a categorical exclusion provides needed uniformity, did appear in the BOP's Federal Register notice. But the court found this reason inadequate, since the BOP failed to explain why it chose to achieve uniformity through exclusion rather than inclusion. Id. at 1113-14.
But the reasoning in Arrington has been rejected by multiple courts, including every subsequent circuit court to consider the issue. Many of these decisions have upheld the regulation upon finding the BOP sufficiently articulated a public safety rationale in the administrative record. See, e.g., Gatewood v. Outlaw, 560 F.3d 843 (8th Cir.2009); Handley v. Chapman, 587 F.3d 273 (5th Cir.2009), cert. denied, ___ U.S. ___, 131 S.Ct. 71, 178 L.Ed.2d 49 (2010); Gardner v. Grandolsky, 585 F.3d 786 (3d Cir.2009). The Eighth Circuit, in Gatewood, for example, found the Arrington court erred in failing to look beyond the BOP's 2000 Federal Register notice for an articulation of the public safety rationale. 560 F.3d at 847. The court concluded the "administrative record" in cases of informal rule making is not limited to the Federal Register notice. Id. Given the regulatory and legal history of the rule, the court held it is "appropriate to discern the reasons for the agency's final rule from the various prior interim rules, Program Statements, and litigation positions reflecting that consistent policy." Id. Accord Handley v. Chapman, 587 F.3d 273, 281-282 (5th Cir.2009) ("[The agency's] prior interim rules, Program Statements, and consistent litigation position. . . . are not the sort of post hoc rationalizations of *1309 appellate counsel that Burlington [Truck Lines, Inc. v. United States, 371 U.S. 156, 83 S.Ct. 239, 9 L.Ed.2d 207 (1962)] forbids us to consider."); Gardner v. Grandolsky, 585 F.3d 786, 792 (3d Cir.2009) ("[W]e find it both reasonable and appropriate to consider the Program Statements when discerning the agency's rationale for promulgating the 1997 and 2000 regulations."). The court's broader look revealed the agency disclosed its view that the regulation was based on the goal of public safety. Gatewood, 560 F.3d at 847.
In light of this new circuit split, in 2009 the BOP again amended the rule to provide additional discussion of its view that offenders convicted of firearm possession charges pose special dangers:
[I]n the correctional experience of the Bureau, the offense conduct of both armed offenders and certain recidivists suggests that they pose a particular risk to the public. There is a significant potential for violence from criminals who carry, possess or use firearms. As the Supreme Court noted in Lopez v. Davis, "denial of early release to all inmates who possessed a firearm in connection with their current offense rationally reflects the view that such inmates displayed a readiness to endanger another's life." [Lopez, 531 U.S.] at 240 [121 S.Ct. 714]. The Bureau adopts this reasoning. The Bureau recognizes that there is a significant potential for violence from criminals who carry, possess or use firearms while engaged in felonious activity. Thus, in the interest of public safety, these inmates should not be released months in advance of completing their sentences.
74 Fed.Reg. 1892, 1895 (Jan. 14, 2009). As a result, the BOP's regulation now sets forth both a public safety and a uniformity rationale that was less clear in earlier versions of the regulation.
With this background we turn to Licon's contentions. In our view, Licon's claims are without merit under either the 2000 or 2009 regulations.
We agree with the reasoning of the Third, Fifth, and Eighth circuits that the BOP set forth a sufficient rationale to satisfy the arbitrary and capricious standard of § 706(2)(A). In considering whether agency action is arbitrary and capricious, we have held "it is appropriate to rely on implicitly adopted rationales . . . as long as they represent the `fair and considered judgment' of the agency, rather than a `post hoc rationalization.'" S. Utah Wilderness Alliance v. Office of Surface Mining Reclamation & Enforcement, 620 F.3d 1227, 1236 (10th Cir.2010) (quoting Auer v. Robbins, 519 U.S. 452, 462, 117 S.Ct. 905, 137 L.Ed.2d 79 (1997)). Since 1995, the BOP has consistently attempted to implement a policy denying early release eligibility to firearm possession offenders in the face of judicial challenges. As discussed above, this saga began with the issuance of the 1995 Program Statement. When the circuit courts divided over the validity of the Program Statement as supporting the eligibility standard, the BOP responded by pursuing the same policy in the form of amended versions of 28 C.F.R. § 550.58. The Federal Register notices for the 1997 and 2000 versions of the rule confirm the BOP's express purpose in promulgating the amended versions of the rule was to avoid the effects of the circuit split. See 62 Fed.Reg. at 53690; 65 Fed. Reg. at 80747. In these circumstances, the 2000 rule need not be examined in isolation, but is more appropriately considered a part of a lengthy rule making process. We therefore hold it is permissible to consider the prior versions of the rule, the related Program Statements, and the position advanced by the BOP in past litigation *1310 to discern the BOP's rationale for the 2000 and 2009 rules.
Looking to these sources, we find public safety was the contemporaneous rationale for the 2000 rule and not merely a post hoc explanation. The 1995 Program Statement explains the agency chose to exclude felons convicted of possession of a dangerous weapon during the commission of a drug offense from early release because this crime "poses a serious potential risk that force may be used against persons or property." Program Statement No. 5162.02, § 9. The BOP reiterated this rationale in the 1996 and 1997 versions of the Program Statement. See Program Statement 5162.02, § 7 (April 23, 1996); Program Statement 5162.04, § 7 (Oct. 9, 1997). In addition, the BOP consistently relied on this explanation in legal challenges to the 1995 version of the rule and Program Statement. See, e.g., Venegas v. Henman, 126 F.3d 760 (5th Cir.1997); Pelissero, 170 F.3d 442.
The rule itself also suggests a public safety purpose. As the Third Circuit has observed,
In addition to felons-in-possession, it also denies eligibility for early release to various categories of prisoners whose offenses manifest a potential for violent behavior, such as prisoners with a prior conviction for homicide, forcible rape, robbery, aggravated assault, or child sexual abuse; prisoners whose current offense is a felony that has an element of actual, attempted, or threatened use of physical force against a person or property; and prisoners whose current offense "by its nature or conduct" presents a serious potential risk of physical force against a person or property, or involves child sexual abuse offenses.
Gardner, 585 F.3d at 793.
The holding of Arrington is also incompatible with the Supreme Court's decision in Lopez. The Ninth Circuit attempted to read Lopez narrowly as addressing only whether the BOP had the authority to promulgate the rule under § 3621(e)(2)(B), and not whether the rule was valid under § 706(2)(A) of the APA. Arrington, 516 F.3d at 1115-16 (observing that, in discussing the BOP's public safety rationale, the Supreme Court cited the appellate brief and not any contemporaneous administrative source). We cannot agree with this interpretation. In defending the rule before the Supreme Court, the BOP not only argued that it had discretion to promulgate the rule, but also that the rule was compliant with § 706.
The Bureau maintains[] the agency may exclude inmates either categorically or on a case by case basis, subject of course to its obligation to interpret the statute reasonably . . . in a manner that is not arbitrary or capricious, 5 U.S.C. § 706. In this instance, the Bureau urges, it has acted reasonably: Its denial of early release to all inmates who possessed a firearm in connection with their current offense rationally reflects the view that such inmates displayed a readiness to endanger another's life. . . .
Lopez, 531 U.S. at 239, 121 S.Ct. 714. The Supreme Court upheld the 1997 version of the rule based in part on its finding that the public safety rationale was substantively reasonable. "[W]e further hold that the regulation excluding Lopez is permissible. The [BOP] reasonably concluded that an inmate's prior involvement with firearms, in connection with the commission of a felony, suggests his readiness to resort to life-endangering violence and therefore appropriately determines the early release decision." Id. at 244, 121 S.Ct. 714. In so doing, the Supreme Court was almost certainly responding to the BOP's argument. Although the Court did not discuss the issue in detail, we think it is unlikely the Supreme Court upheld the public safety rationale without considering whether that *1311 rationale was merely a post hoc rationalization conjured for appeal. Accord Gardner, 585 F.3d at 792-93.
Having found the BOP's public safety rationale is reasonably discernable, we are bound by Lopez to also hold it is substantively valid. 531 U.S. at 244, 121 S.Ct. 714. It is not arbitrary and capricious to categorize prisoners convicted of firearm possession as violent offenders. For these reasons, we conclude the 2000 regulation is not arbitrary and capricious. And the 2009 amendment easily passes muster as well.

2. Fraudulent Inducement
We now turn to Licon's second claim. He contends the prosecutor fraudulently induced him to plead guilty by promising early release upon successful completion of the RDAP, knowing he was ineligible for this benefit. This claim is an attack on the validity of his plea agreement, and the conviction and sentence based on that agreement.
But a habeas petition under § 2241 is not the appropriate vehicle for Licon to challenge the legality of his sentence. "A petition under . . . § 2241 attacks the execution of a sentence rather than its validity and must be filed in the district where the prisoner is confined." Bradshaw v. Story, 86 F.3d 164, 166 (10th Cir.1996). "A 28 U.S.C. § 2255 petition attacks the legality of detention and must be filed in the district that imposed the sentence." Id. (citations omitted). We therefore find that Licon's challenge to his plea agreement should have been brought under § 2255 in the Northern District of Texas. See Kuehner v. Guzik, 1999 WL 1246917, *2 (10th Cir. Dec. 23, 1999) (finding defendant's claim that his guilty pleas was not made knowingly and voluntarily must be raised in the district that imposed the sentence).
Finally, because we agree with the district court's decision to dismiss Licon's petition, we do not reach his request for class certification.

III. Conclusion
For the foregoing reasons, we AFFIRM the district court's denial of the habeas petition. We also GRANT Licon's application to proceed in forma pauperis.
NOTES
[*]  After examining the brief and the appellate record, this three-judge panel has determined unanimously that oral argument would not be of material assistance in the determination of this appeal. See Fed. R.App. P. 34(a); 10th Cir. R. 34.1(G). The cause is therefore ordered submitted without oral argument. Because Licon did not serve respondent H.A. Ledezma with notice of this appeal, Ledezma has not entered an appearance or filed a response.
[1]  Section 3621(e)(2)(B) provides more fully: "The period a prisoner convicted of a nonviolent offense remains in custody after successfully completing a treatment program may be reduced by the Bureau of Prisons, but such reduction may not be more than one year from the term the prisoner must otherwise serve."
[2]  In an attempt to clarify the definition of "crimes of violence," the Program Statement provided an exhaustive list of "criminal offenses that are crimes of violence in all cases," "criminal offenses that may be crimes of violence depending on the specific offense characteristic assigned," and "criminal offenses that may be crimes of violence depending on a variety of factors." Program Statement No. 5162.02, § 9 (July 24, 1995).
[3]  It is unclear whether Licon was denied eligibility under the 2000 rule or the 2009 rule. We conclude that both rules comply with the APA.
