                 FOR PUBLICATION
 UNITED STATES COURT OF APPEALS
      FOR THE NINTH CIRCUIT

STAFFORD B. DAVIS,                    
              Petitioner-Appellant,        No. 05-55164
                v.                           D.C. No.
JEANNE S. WOODFORD, Director,             CV-02-01186-
California Department of                    AHS (RMC)
Corrections,                                 OPINION
              Defendant-Appellee.
                                      
       Appeal from the United States District Court
           for the Central District of California
      Alicemarie H. Stotler, District Judge, Presiding

                 Argued and Submitted
           March 8, 2006—Pasadena, California

                   Filed April 27, 2006

   Before: Susan P. Graber, Kim McLane Wardlaw, and
          Johnnie B. Rawlinson, Circuit Judges.

                 Opinion by Judge Graber




                           4823
4826                 DAVIS v. WOODFORD


                         COUNSEL

Kenneth M. Stern, Law Offices of Kenneth M. Stern, Wood-
land Hills, California, for the petitioner-appellant.

Scott C. Taylor, Supervising Deputy Attorney General, San
Diego, California, for the respondent-appellee.


                         OPINION

GRABER, Circuit Judge:

  In 2000, a state-court jury convicted Petitioner Stafford B.
Davis of being a felon in possession of a firearm and of evad-
                       DAVIS v. WOODFORD                     4827
ing a peace officer. The state court sentenced him to 25 years
to life in prison under California’s Three Strikes Law, count-
ing as eight “strikes” a 1986 California conviction that
involved eight robberies. After unsuccessful state appeals and
state habeas petitions, Petitioner filed this federal petition for
a writ of habeas corpus. He now appeals the district court’s
denial of his requested relief, arguing primarily that the use of
his 1986 conviction as eight separate “strikes” breached the
1986 plea agreement. We agree.

   In 1986 the state expressly agreed to treat the robbery con-
viction as only one “strike” for purposes of later recidivist
sentencing, so counting that conviction as eight “strikes” vio-
lated the terms of Petitioner’s plea agreement. The California
Supreme Court’s denial of Petitioner’s state habeas petition
was based on an unreasonable determination of the facts in
the light of the evidence presented in state court, 28 U.S.C.
§ 2254(d)(2), and involved an unreasonable application of
clearly established Supreme Court precedent, Santobello v.
New York, 404 U.S. 257 (1971), within the meaning of 28
U.S.C. § 2254(d)(1). We therefore reverse and remand with
instructions to grant the writ of habeas corpus in this respect,
subject to the state’s resentencing Petitioner within a reason-
able time.

                       BACKGROUND

   On February 15, 1999, Petitioner argued with his landlady.
She called 911 and reported that Petitioner had been brandish-
ing a gun and had departed in a white Volkswagen. Two offi-
cers responded to the call. They followed Petitioner’s car and
ordered him to pull over. Petitioner disobeyed the order,
drove back to the house, and ran up to the porch. The landlady
slammed the door before Petitioner could enter, and the offi-
cers apprehended him. A loaded gun slipped from his waist-
band to the ground.

   A 2000 information charged Petitioner with being a felon
in possession of a firearm and with evading a police officer.
4828                      DAVIS v. WOODFORD
It further charged that Petitioner had nine prior serious felony
convictions within the meaning of the Three Strikes Law; the
first eight stemmed from robberies prosecuted in 1986.

   It is clear that there were several different robberies under-
lying the 1986 conviction, and the state filed two separate
informations against Petitioner. He pleaded guilty to eight
counts of robbery with the understanding that the two infor-
mations would be consolidated into one and that there would
be only one conviction on his record. At the plea colloquy, the
judge asked the prosecutor to spell out the terms of the plea
agreement, and the prosecutor responded:

         [THE PROSECUTOR]: Your Honor, it’s my
      understanding that both defendants[1] will plead to
      the Information as alleged, which would be, as I
      counted, . . . eight counts against Mr. Davis, and that
      they will receive five years in state prison as a conse-
      quence of that plea. For all purposes, it is the Peo-
      ple’s position that this would be one five-year prior
      on their record as a violent felony pursuant to Propo-
      sition 8.[2] Even though there were two separate
      Informations in this case, they were consolidated.

        THE COURT: So there’s only one instead of two
      priors?

        [THE PROSECUTOR]: That’s correct, Your
      Honor. It would be one prior for all purposes.

(Emphasis added.)
  1
    The 1986 codefendant’s case is not before us.
  2
    “Proposition 8” was a 1982 ballot initiative codified in relevant part at
California Penal Code section 667(a)(1). See People v. Harris (In re Har-
ris), 775 P.2d 1057, 1059 (Cal. 1989) (discussing Proposition 8). Section
667(a)(1) still exists alongside the subsequently enacted Three Strikes
Law. Cal. Penal Code § 667(b)-(i) (2006).
                      DAVIS v. WOODFORD                    4829
   Later during the plea colloquy, speaking directly to Peti-
tioner, the prosecutor explained that if Petitioner were to com-
mit another serious felony, five years could be added to his
sentence. The prosecutor specified: “It will be one five-year
prior on your record. Do you understand that? But not two.
Do you understand that, Mr. Davis?” Petitioner answered,
“Yes.” The prosecutor then asked, “Knowing that, do you still
wish to plead guilty, Mr. Davis?” Again Petitioner said,
“Yes.”

   In the 2000 case, Petitioner agreed to a bench trial at sen-
tencing. The state-court judge struck the ninth alleged prior
conviction, found that Petitioner had eight prior “strikes” due
to the 1986 robbery conviction, and sentenced him to 25 years
to life in prison.

                        DISCUSSION

A.   Timeliness of the Appeal

   As an initial matter, we must address the Warden’s conten-
tion that this appeal should be dismissed as untimely. See
Kwai Fun Wong v. United States, 373 F.3d 952, 960 (9th Cir.
2004) (noting that the existence of appellate jurisdiction is a
threshold question).

   The district court denied the habeas petition on December
2, 2004. Under Federal Rule of Appellate Procedure 4, Peti-
tioner had 30 days within which to file a notice of appeal.

   Petitioner submitted a sworn Proof of Service form show-
ing that his fellow inmate Stephen Snow deposited the Notice
of Appeal in the Folsom State Prison’s mail system on
December 31, 2004. The Warden points to the prison’s legal
mail logs, which show that the only mail from either Peti-
tioner or Snow to the United States District Court in Los
Angeles was sent on January 7, 2005. The Warden also offers
a declaration from the mail room supervisor stating that mail
4830                  DAVIS v. WOODFORD
generally is processed, logged in, and mailed on the same day
it is delivered by the inmate. But an addendum to the supervi-
sor’s declaration states that she was absent on the last Friday
in December 2004 (which was December 31) and that mail
arriving on that day should have been processed on the fol-
lowing Monday.

   [1] On these facts, we hold that Petitioner can take advan-
tage of Federal Rule of Appellate Procedure 4(c), otherwise
known as the “mailbox rule.” Under the mailbox rule, if an
inmate deposits a notice of appeal in the institution’s internal
mail system on or before the last day for filing, the notice is
timely. The evidence is that Snow deposited the Notice of
Appeal in the prison mail system on December 31 and that no
mail went out on that day. The fact that the prison log shows
that the mail was sent on January 7 is not inconsistent with its
having been deposited on December 31. Thus, the notice of
appeal was timely filed, and we have jurisdiction to consider
the merits. See Sudduth v. Ariz. Attorney Gen., 921 F.2d 206,
207 (9th Cir. 1990) (published order) (declining to remand to
the district court for a determination of timeliness).

B.     Santobello Claim

   Because Petitioner filed his habeas petition after April 24,
1996, it is governed by the Antiterrorism and Effective Death
Penalty Act of 1996 (“AEDPA”). Under AEDPA, a writ of
habeas corpus cannot be granted unless the state court’s deci-
sion “was contrary to, or involved an unreasonable applica-
tion of, clearly established Federal law, as determined by the
Supreme Court of the United States,” 28 U.S.C. § 2254(d)(1),
or “was based on an unreasonable determination of the facts
in light of the evidence presented in the State court proceed-
ing,” id. § 2254(d)(2).

   There is no reasoned state-court decision addressing Peti-
tioner’s claim that the use of his 1986 conviction as eight
strikes violated his plea agreement. He first raised the claim
                      DAVIS v. WOODFORD                   4831
in a habeas petition before the California Supreme Court, and
that petition was denied without comment. Therefore, we
undertake an independent review of the record. See Delgado
v. Lewis, 223 F.3d 976, 982 (9th Cir. 2000) (“Federal habeas
review is not de novo when the state court does not supply
reasoning for its decision, but an independent review of the
record is required to determine whether the state court clearly
erred in its application of controlling federal law.”).

   [2] In Santobello, the Supreme Court held that the govern-
ment is bound by plea agreements and that, “when a plea rests
in any significant degree on a promise or agreement of the
prosecutor, so that it can be said to be part of the inducement
or consideration, such promise must be fulfilled.” 404 U.S. at
262. The question before us is whether the state promised
Petitioner that he would have only one prior conviction on his
record and, if so, whether Petitioner’s guilty plea was induced
by that promise. See Mabry v. Johnson, 467 U.S. 504, 509-10
(1984) (clarifying that a Santobello claim requires the plea to
be induced by the prosecutor’s promise).

   Although we know little about the 1986 robberies, we do
know from the plea colloquy that two informations were filed
against Petitioner. Further, Petitioner’s testimony in the 2000
trial and a declaration by his codefendant make it clear that
several robberies were involved. Thus, the state could have
brought and tried two separate cases, possibly resulting in two
prior convictions under then-current law, but it agreed to con-
solidate them.

   The Warden argues that the prosecutor’s in-court state-
ments merely explained the extant law but made no promise
to Petitioner. Reading the 1986 plea colloquy as a whole, we
are unpersuaded. The only reasonable inference to draw from
the colloquy is that the state promised to treat the conviction
as a single “prior.”

  [3] California Penal Code section 667(a)(1), which was the
law in effect at the time of Petitioner’s 1986 conviction, pro-
4832                  DAVIS v. WOODFORD
vides that a person being sentenced for certain serious felo-
nies receives a five-year sentence enhancement “for each such
prior conviction [of certain serious felonies] on charges
brought and tried separately.” (Emphasis added.) “Brought
and tried separately” means that “the underlying proceedings
must have been formally distinct, from filing to adjudication
of guilt.” In re Harris, 775 P.2d 1057, 1060 (Cal. 1989). Sep-
arate charging documents are required, but guilty pleas and
sentences do not have to be entered and imposed in separate
proceedings. People v. Wagner, 26 Cal. Rptr. 2d 383, 388 (3d
Dist. Ct. App. 1994); People v. Gonzales, 269 Cal. Rptr. 221,
224-25 (6th Dist. Ct. App. 1990); People v. Thomas, 267 Cal.
Rptr. 908, 915-16 (4th Dist. Ct. App. 1990). Accordingly, in
the context of that statute, the prosecutor’s statement to Peti-
tioner that a later sentence for a serious felony could be
enhanced by five years—rather than by ten years—takes on
particular significance.

   [4] If there had been no possibility of more than one prior
conviction, then the statement that Petitioner would have only
one prior on his record would have been merely descriptive.
But it is evident from the plea colloquy that the prosecutor
bargained away his right to bring two separate cases against
Petitioner in exchange for a guilty plea. In the circumstances,
the statement that there would only be one prior on Petition-
er’s record was promissory in nature.

   [5] We also reject the Warden’s argument that the state-
ments made by the prosecutor at the 1986 plea colloquy were
not part of the agreement. Although the transcript of that hear-
ing is the only evidence the parties have given us of the terms
of the plea agreement, the prosecutor’s statements show con-
clusively that the “single prior” term had been bargained for
expressly. At the outset of the hearing, when asked by the
court to describe the terms of the agreement, the prosecutor
replied that there would be only “one prior” on Petitioner’s
record “for all purposes” and that the two informations were
to be consolidated. Even if this term had not been negotiated
                      DAVIS v. WOODFORD                     4833
before the proceedings took place in open court, it still
became part of the agreement as a result of the prosecutor’s
statements at the plea colloquy. Brown v. Poole, 337 F.3d
1155, 1159-60 (9th Cir. 2003).

   [6] Furthermore, it is clear that the prosecutor’s promise
played a role in Petitioner’s decision to plead guilty. What
induced the guilty plea is an objective inquiry: “Where it is
clear from context what would reasonably have prompted
acceptance of the agreement, even in part, no further specula-
tive factual inquiry is needed.” Id. at 1160 (citing INS v. St.
Cyr, 533 U.S. 289, 322-23 (2001)). Objectively, the benefits
of the bargain to Petitioner were the relatively short prison
term and the fact that he would have only one prior convic-
tion on his record. Deciding that the promise of “one prior”
had no bearing on Petitioner’s decision to plead guilty would
be an unreasonable finding of fact within the meaning of 28
U.S.C. § 2254(d)(2).

   Under AEDPA, we also must consider whether the Califor-
nia Supreme Court’s decision is consistent with a proper
application of state contract law in interpreting the plea agree-
ment; if not, the decision was an “unreasonable application
of” clearly established federal law. Buckley v. Terhune, 441
F.3d 688, 694-95 (9th Cir. 2006) (en banc); Brown, 337 F.3d
at 1160 n.2; see also Ricketts v. Adamson, 483 U.S. 1, 6 n.3
(1987) (holding that the interpretation of state plea agree-
ments is a matter of state law). We recognize that, in Califor-
nia, contracts (including plea bargains) are “deemed to
incorporate and contemplate not only the existing law but the
reserve power of the state to amend the law or enact addi-
tional laws.” People v. Gipson (In re Gipson), 12 Cal. Rptr.
3d 478, 481 (6th Dist. Ct. App. 2004) (internal quotation
marks omitted). Our holding today respects this principle.

  The present case is easily distinguishable from Gipson.
There, the court upheld application of the Three Strikes Law
against a defendant whose plea agreement in an earlier case
4834                  DAVIS v. WOODFORD
had incorporated section 667(a) by reference. Id. at 482. Here,
the plea agreement did not merely incorporate existing law by
reference; rather, it included a specific promise about how
many prior convictions would be placed in Petitioner’s crimi-
nal record as a result of the guilty plea. Petitioner’s plea bar-
gain did not purport to freeze the law as it was in 1986.
Instead, the parties agreed on the facts (number of “priors”)
that could be used, later, to sentence Petitioner under what-
ever law might then be in effect.

   [7] Under California law, a contract must be interpreted so
as “to give effect to the mutual intention of the parties as it
existed at the time of contracting.” Cal. Civ. Code § 1636.
The prosecutor unequivocally stated that Petitioner would
have only one prior conviction on his record “for all pur-
poses.” Even if there were ambiguity, which we think there
was not, any such ambiguity should be resolved in Petition-
er’s favor. Buckley, 441 F.3d at 698; People v. Toscano, 20
Cal. Rptr. 3d 923, 926 (2d Dist. Ct. App. 2004). As a matter
of California contract law, Petitioner’s prior conviction
counted as only one strike.

   [8] The Warden’s counsel protested at oral argument that
holding the state to this promise would conflict with Parke v.
Raley, 506 U.S. 20 (1992), in which the Supreme Court
upheld Kentucky’s use of a rebuttable presumption that a con-
viction offered for sentencing enhancement purposes was val-
idly obtained, and noted that recidivism statutes have been
repeatedly upheld against various constitutional challenges.
Id. at 30, 34. Our result does not conflict with Parke. We do
not here undermine the constitutionality of the Three Strikes
Law, nor do we question whether it applied to this case. We
also do not quarrel with the notion that, ordinarily, each count
in a single proceeding can be used as a separate “strike” under
that statute. People v. Fuhrman, 941 P.2d 1189, 1194 (Cal.
1997). We hold only that the state must live with the particu-
lar bargain that it made. This is an unusual case, in that the
prosecutor made a specific promise about the number of “pri-
                      DAVIS v. WOODFORD                    4835
ors” that would go on Petitioner’s criminal record as a result
of pleading guilty. Giving effect to the plea agreement means,
simply, treating the 1986 conviction as a single strike under
the Three Strikes Law.

   [9] Implicit in the California Supreme Court’s denial of
Petitioner’s Santobello claim are an unreasonable finding of
fact and an unreasonable application of clearly established
Supreme Court law. Accordingly, we reverse the district
court’s denial of the habeas petition on that ground.

C.   Apprendi Claim

   Petitioner also argues that his sentence violated Apprendi v.
New Jersey, 530 U.S. 466 (2000), because he did not intelli-
gently waive a jury trial to determine the truth of the alleged
prior convictions. We disagree.

   [10] Apprendi held that, for purposes of federal constitu-
tional law, “[o]ther than the fact of a prior conviction, any
fact that increases the penalty for a crime beyond the pre-
scribed statutory maximum must be submitted to a jury, and
proved beyond a reasonable doubt.” Id. at 490 (emphasis
added). Here, only the existence of a prior conviction is at
issue, and Petitioner has no federal right to have a jury decide
that question. The fact that Petitioner had a state statutory
right to a jury trial on his prior convictions, see Dillard v.
Roe, 244 F.3d 758, 769 (9th Cir. 2001) (discussing California
Penal Code section 1025), does not avail him. The Constitu-
tion permits prior convictions to be used to enhance a sen-
tence, without being submitted to a jury, so long as the
convictions were themselves obtained in proceedings that
required the right to a jury trial and proof beyond a reasonable
doubt. Apprendi, 530 U.S. at 488; Jones v. United States, 526
U.S. 227, 249 (1999); United States v. Tighe, 266 F.3d 1187,
1193-94 (9th Cir. 2001). There is no suggestion that Petition-
er’s 1986 conviction was obtained without the requisite proce-
4836                  DAVIS v. WOODFORD
dural safeguards. Thus, we reject Petitioner’s claim that his
sentence violated Apprendi.

   REVERSED and REMANDED with instructions to grant
the writ of habeas corpus in part, consistent with this opinion,
subject to the state’s resentencing Petitioner within a reason-
able time.
