Ernesto Cruz pleaded guilty pursuant to a written plea agreement to one count of possession with intent to distribute more than 100 grams of heroin in violation of 21 U.S.C. § 841(a). Cruz argues that his plea was invalid on several grounds.
Cruz claims that his attorney’s constitutionally ineffective assistance in connection with his guilty plea rendered his plea invalid. Generally, this court declines to review claims of ineffective assistance of counsel on direct appeal. United States v. Miller, 406 F.3d 323, 335-36 (5th Cir.2005), cert. denied, — U.S.-, 126 S.Ct. 207, 163 L.Ed.2d 278 (2005); see also United States v. Gibson, 55 F.3d 173, 179 (5th Cir.1995). The Supreme Court has emphasized that a 28 U.S.C. § 2255 motion is the preferred method for raising a claim of ineffective assistance of counsel. See Massaro v. United States, 538 U.S. 500, 503-04, 123 S.Ct. 1690, 155 L.Ed.2d 714 (2003). Accordingly, this court has “undertaken to resolve claims of inadequate representation on direct appeal only in rare cases where the record allowed [the court] to evaluate fairly the merits of the claim.” United States v. Higdon, 832 F.2d 312, 314 *259(5th Cir.1987). Cruz’s is not one of those rare cases.
Cruz also argues that his guilty plea was not voluntary because the district court (1) violated Cruz’s constitutional rights by failing to adequately inquire into the factual basis of the plea and (2) violated Fed.R.Crim.P. 11(b)(1)(G) by failing to adequately advise Cruz of the nature of the charges against him and to ascertain Cruz’s understanding of those charges.
As Cruz failed to challenge the voluntariness of his plea or the district court’s compliance with Rule 11, review is for plain error, which requires Cruz to demonstrate (1) error, (2) that is clear or obvious, and (3) that affects substantial rights. See United States v. Vonn, 535 U.S. 55, 59, 122 S.Ct. 1043, 152 L.Ed.2d 90 (2002); United States v. Reyes, 300 F.3d 555, 558 (5th Cir.2002). In considering the “substantial rights” prong, we review the entire record to determine whether there exists a “reasonable probability that, but for the error, he would not have entered the plea.” United States v. Dominguez Benitez, 542 U.S. 74, 83, 124 S.Ct. 2333, 159 L.Ed.2d 157 (2004).
If “a defendant pleads guilty while claiming his innocence, the court commits constitutional error in accepting the plea unless the plea is shown to have a factual basis.” Willett v. Georgia, 608 F.2d 538, 540 (5th Cir.1979). However, Cruz did not plead guilty while maintaining his innocence. All of Cruz’s denials of responsibility took place after he had signed the plea agreement and the factual resume, after his rearraignment before the district court, and after the district court accepted his plea agreement. See Fed.R.Crim.P. 11(d); see also United States v. Badger, 925 F.2d 101, 103-04 (5th Cir.1991). In any case, the plea had a factual basis. The facts recited in the plea agreement and factual resume, and the colloquy at Cruz’s rearraignment, all provide a factual basis for his conviction for the charge set forth in the indictment.
Cruz’s argument that the district court failed to adequately advise him of and ascertain his understanding of the charges against him is also unavailing. Cruz has failed to demonstrate that the district court varied from the requirements of Rule 11, much less that any such variance affected his decision to plead guilty. See Fed.R.Crim.P. 11; United States v. Dominguez Benitez, 542 U.S. 74, 83, 124 S.Ct. 2333, 159 L.Ed.2d 157 (2004).
For the foregoing reasons, the judgment of the district court is AFFIRMED.