
    Luis Duenes MARTINEZ, Petitioner—Appellant, v. Mike EVANS, Respondent—Appellee.
    No. 08-17047.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted Oct. 7, 2009.
    Filed Oct. 30, 2009.
    
      William M. Robinson, Sixth District Appellate Program, Santa Clara, CA, for Petitioner-Appellant.
    Amy Haddix, Deputy Attorney General, Office of the California Attorney General, San Francisco, CA, for Respondent-Appel-lee.
    Before: HUG and PAEZ, Circuit Judges, and RESTANI, Judge.
    
      
       The Honorable Jane A. Restani, Chief Judge of the United States Court of International Trade, sitting by designation.
    
   MEMORANDUM

Luis Duenes Martinez appeals the district court’s denial.of his petition for a writ of habeas corpus pursuant to 28 U.S.C. § 2254. Martinez claims that the State violated the Ex Post Facto Clause of the United States Constitution because the credits to be applied to his sentence were limited by a statute that was not effective until after the date of his crimes. See U.S. Const, art. I, § 10, cl. 1. The district court found that because Martinez’s guilty plea was knowing and voluntary, the waiver of his ex post facto claim did not violate his constitutional rights. We have jurisdiction pursuant to 28 U.S.C. § 1291. We review de novo a district court’s decision to deny a petition for writ of habeas corpus filed pursuant to 28 U.S.C. § 2241, and we affirm.

The credit limitation was referenced three times during Martinez’s plea hearing. First, the prosecutor stated:

[I]t is the People’s understanding, and this is an actual condition of the plea ... that he will be required to serve at least 85 percent of his sentence because these are violent felonies ... and that he will receive a prison sentence of twenty-six years top/bottom.

(ER 16-17.) The trial court also informed Martinez that he would “be sentenced to twenty-six years in prison top/bottom” and that he would “be serving 85 percent of that term.” (ER 21-22.) Finally, the prosecutor stated: “I don’t know if it is this Court’s practice to advise regarding credits. It is the People’s belief there is a limitation on credits in this case. The maximum good time he can receive in this case would be a maximum of 15 percent.” (ER 22-23.) The court replied that it “told him that he would have to serve 85 percent of his time.” (ER 23.)

After considering California law and this specific language, the California Court of Appeal determined that the credit limitation was a specified term of the plea bargain. People v. Martinez, No. H025956, 2004 WL 1798118, at *8-9, 2004 LEXIS 7469, at *24 (Cal.Ct.App. Aug. 12, 2004). Federal courts may not second-guess a state appellate court’s construction of a plea agreement and the obligations arising thereunder which “are, within broad bounds of reasonableness, matters of state law....” Ricketts v. Adamson, 483 U.S. 1, 5 n. 3, 107 S.Ct. 2680, 97 L.Ed.2d 1 (1987). In California, plea agreements are interpreted using the general rules of contract interpretation. Brown v. Poole, 337 F.3d 1155, 1159 (9th Cir.2003). Here, the California appellate court’s application of state contract law was proper, and the result it reached was reasonable. Therefore, Martinez’s constitutional rights were not violated. In addition, the California appellate court’s determination that Martinez entered into a voluntary, knowing, and intelligent waiver of his ex post facto claim is not contrary to, or an unreasonable application of, federal law. See Brady v. United States, 397 U.S. 742, 748, 90 S.Ct. 1463, 25 L.Ed.2d 747 (1970). Thus, under AED-PA, Martinez is not entitled to a writ of habeas corpus on this claim. See 28 U.S.C. § 2254(d)(1).

Martinez’s plea agreement was based on an informed choice to accept a maximum sentence of twenty-six years, which is significantly less than what he could have served if he had been convicted on all counts. Martinez, 2004 WL 1798118, at *17, 2004 LEXIS 7469, at *50. The court carefully questioned Martinez at the plea hearing, ensuring that he knew that an eighty-five percent credit limitation would apply to his sentence, even if he may not have known that the plea agreement waived his right to a possible ex post facto challenge. Martinez’s waiver was intelligent, as he had competent counsel, was aware of the nature of the charge against him, and was not incompetent or otherwise not in control of his mental faculties. See Brady, 397 U.S. at 756, 90 S.Ct. 1463. Accordingly, Martinez’s waiver was effective. See United States v. Ruiz, 536 U.S. 622, 629-30, 122 S.Ct. 2450, 153 L.Ed.2d 586 (2002); cf. Rose v. Palmateer, 395 F.3d 1108, 1113 (9th Cir.2005) (holding that a defendant waived his ex post facto claim by agreeing to life imprisonment without the possibility of parole, a sentence not available at the time of the offense under the applicable statute, as an express condition of his plea).

AFFIRMED. 
      
       This disposition is not appropriate for publication and is not precedent except as provided by 9th Cir. R. 36-3.
     