Opinion by Judge CANBY; Dissent by Judge O’SCANNLAIN.
CANBY, Circuit Judge:Tony Eugene Saffold is a state prisoner appealing the district court’s dismissal of his federal petition for habeas corpus. The district court concluded that Saffold had failed to satisfy the one-year statute of limitations for a state prisoner filing a federal habeas petition. See 28 U.S.C. § 2244(d)(1). Whether or not Saffold’s petition is barred by the statute of limitations turns in part on a calculation of the period during which the federal statute was tolled while Saffold’s petitions for state habeas relief were “pending” in the California courts. See 28 U.S.C. § 2244(d)(2). After the district court issued its order, we decided in another case how the tolling period for exhaustion of state remedies is to be determined. See Nino v. Galaza, 183 F.3d 1003 (9th Cir.1999), cert. denied, — U.S. -, 120 S.Ct. 1846, 146 L.Ed.2d 787 (2000). We now apply Nino and conclude that the district court- erred by failing to toll the federal statute of limitations for the entire period during which Saffold pursued state habeas relief.
We also conclude that the “mailbox” rule for pro se prisoners applies to Saffold’s petitions to the California court and the federal court for purposes of calculating tolling time under AEDPA. Whether and when Saffold delivered his petitions to prison authorities is unresolved. We therefore reverse the judgment of the district court and remand for further proceedings.
THE STATUTE OF LIMITATIONS
In 1990, Saffold was found guilty in California state court of murder, assault with a firearm, and two counts of robbery. He appealed, and his conviction became final on direct review on April 20,1992.
Effective April 24,1996, Congress enacted the Antiterrorism and Effective Death Penalty Act of 1996, Pub.L. No. 104-132, 110 Stat. 1214 (“AEDPA”). AEDPA imposed, for the first time, a one-year statute of limitations for state prisoners filing federal petitions for habeas corpus. For prisoners like Saffold, whose convictions had become final before passage of AEDPA, the one-year limitations period began running on AEDPA’s effective date, April 24, 1996, and expired on April 23, 1997, unless it was tolled. See Miles v. Prunty, 187 F.3d 1104, 1106 (9th Cir.1999).1
AEDPA’s tolling provision states that “[t]he time during which a properly filed application for State post-conviction or other collateral review ... is pending shall not be counted toward any period of limitation.” 28 U.S.C. § 2244(d)(2).
*1089Saffold contends that he got in under the wire by filing his state habeas application in the Superior Court of San Joaquin County by delivering the petition to prison authorities on April 17, 1997-just six days before the AEDPA one-year limitation would have expired. The district court accepted that contention for purposes of decision and, in order to review the district court’s ruling, we accept it as well.
The issue for our decision is how much of the time after April 17, 1997, was tolled for purposes of AEDPA.2 We conclude that Saffold had a state collateral proceeding “pending” within the meaning of AEDPA’s tolling provision, 28 U.S.C. § 2244(d)(2), during the entire period from the time he filed his state petition in the trial court until the California Supreme Court denied his habeas petition.
The Superior Court denied Saffold’s state habeas petition on June 9, 1997. Five days thereafter, on June 14, 1997, Saffold delivered to prison authorities his habeas petition to the California Court of Appeal. The Court of Appeal denied that petition on June 26, 1997. Saffold then waited four and one-half months befobe filing an original habeas petition in the California Supreme Court, on November 13, 1997.3 The California Supreme Court denied the petition “on the merits and for lack of diligence” on May 27, 1998.
The district court ruled that the AEDPA limitation was tolled only while each state court had the petition under consideration. Thus, it excluded the gap of four days from the Superior Court’s denial of Saffold’s petition to his filing of a petition with the state Court of Appeal by delivery to prison authorities. It also ex-eluded the four and one-half months between the denial by the Court of Appeal and Saffold’s filing of his petition with the California Supreme Court.4 By this calculation, Saffold had run over his one-year limitation by nearly five months when he filed his federal petition.
We know now that the district court erred in ruling that time ran for AEDPA purposes during all times when a petition was not actually under consideration in a state court. After the district court issued its order, we decided Nino v. Galaza, 183 F.3d 1003 (9th Cir.1999), cert. denied, — U.S.-, 120 S.Ct. 1846, 146 L.Ed.2d 787 (2000). There we held that:
the AEDPA statute of limitations is tolled for “all of the time during which a state prisoner is attempting, through proper use of state court procedures, to exhaust state court remedies with regard to a particular post-conviction application.”
Applying these principles to California’s post-conviction procedure, we hold that the statute of limitations is tolled from the time the first state habeas petition is filed until the California Supreme Court rejects the petitioner’s final collateral challenge.
Id. at 1006 (footnote and citation omitted) (emphasis added). It seems clear, therefore, that time should have continued to be tolled during the brief gap of a few days between the Superior Court’s denial of Saffold’s habeas petition and his filing of a petition in the Court of Appeal. It is less clear under Nino, however, whether limitations should be tolled during the four and one-half months after the Court of *1090Appeal denied relief and before Saffold petitioned the California Supreme Court. Section 2244(d)(2) tolls the AEDPA limitation while a “properly filed” application for habeas is pending in state court. 28 U.S.C. § 2244(d)(2). Nino stated, as we have emphasized above, that time was tolled while a petitioner was attempting to exhaust state collateral remedies “ ‘through proper use of state court procedures.’” Nino, 183 F.3d at 1006. We then added a footnote to Nino, stating:
Because it is not at issue in this case, we express no opinion as to whether tolling pursuant to AEDPA should be applied if the California state courts have dismissed a state habeas petition as untimely because the petitioner engaged in substantial delay in asserting habeas claims.
Id. at 1006 n. 4.5
The California Supreme Court’s order denying Saffold relief stated, in its entirety: “Petition for writ of habeas corpus is DENIED on the merits and for lack of diligence.” The State contends that this order raises the question that Nino left open, but we conclude that the order does not. First and most important, the California Supreme Court did address the merits of Saffold’s claim. The whole purpose of the tolling requirement is to permit state courts to address the merits of the petitioner’s claim. As we observed in Nino, “[tjolling AEDPA’s statute of limitations until the state has fully completed its review reinforces comity and respect between our respective judicial systems.” Id. at 1007. We therefore decline to adopt a rule that would require Saffold to have filed his federal petition before the California Supreme Court ruled on the merits of his claim.
Even if we give separate consideration to the California Supreme Court’s alternative ruling that Saffold’s petition was denied “for lack of diligence,” we conclude that time should remain tolled because the dismissal for untimeliness. at least partially addressed the merits. The order wholly fails to specify, either by additional explanation or citation to authority, whether the delay to which it refers is the four and one-half months from the decision of the Court of Appeal to the filing of Saffold’s petition in the California Supreme Court, or the five years from the finality of Saf-fold’s conviction to his first habeas petition.6 But, in either event, at the time when it denied Saffold’s petition partly for “lack of diligence,” the California Supreme Court applied its untimeliness bar only after considering to some degree the underlying federal constitutional questions raised. See La Crosse v. Keman, 211 F.3d 468, 473-74 (9th Cir.2000). Accordingly, such an untimeliness ruling did not constitute an independent state ground of decision. See id. at 474. We fail to see why an untimeliness ruling entangled with the federal constitutional merits, which is insufficient to cause a default of a federal claim, should be sufficient to defeat tolling of the AEDPA limitation. The untimeliness ruling involves consideration of the federal constitutional claims. As we have already stated, we are reluctant to require the filing of a federal petition before the California Supreme Court has finished its consideration of the merits of the claims. That reluctance continues whether the California Supreme Court is considering the merits directly, or derivatively in the course of determining whether an untimeliness bar should apply.
We conclude, therefore, that the California Supreme Court’s denial of Saffold’s petition on the alternative ground of “lack of diligence” did not cause an interruption of the tolling period that began on April 17, 1997. Pursuant to Nino, Saffold is *1091entitled to exclude from the calculation of the one-year limitation the entire period from the filing of his first state habeas petition in Superior Court until the denial of his habeas petition by the California Supreme Court on May 27,1998.7
THE “MAILBOX” RULE
We reverse, therefore, the judgment of the district court that failed to credit Saffold with this entire time of tolling. We cannot direct the district court to entertain Saffold’s petition, however, because there remain other matters in dispute concerning its timeliness. In Houston v. Lack, 487 U.S. 266, 276, 108 S.Ct. 2379, 101 L.Ed.2d 245 (1988), the Supreme Court held that a notice of appeal by a pro se prisoner is deemed filed at the moment the prisoner delivers it to prison authorities for forwarding to the clerk of court. We have said that the same rale would appear to apply to habeas corpus petitions filed under AEDPA. See Miles v. Prunty, 187 F.3d 1104, 1106 n. 2 (9th Cir.1999) (canvassing cases of other circuits so holding). We now hold that it does, and apply the Houston “mailbox” rule not only to the filing of Saffold’s federal petition but also, for purposes of calculating the AEDPA limitation period, to the filing of Saffold’s petition to state court that began the period of tolling. At both times, the conditions that led to the adoption of the mailbox rale are present; the prisoner is powerless and unable to control the time of delivery of documents to the court. See Houston v. Lack, 487 U.S. at 270-72, 108 S.Ct. 2379.
The district court assumed, as we have, without deciding, that Saffold delivered his first state petition to prison authorities for mailing on April 17, 1997. The State disputes that point and, because the initial petition was not stamped “filed” in Superi- or Court until May 1, 1997, it will be necessary for the district court to determine when Saffold’s petition was delivered to prison authorities in order to decide whether the limitation period that expired on April 23, 1997, had already ran at that time. If Saffold delivered the petition to prison authorities on or before April 23, 1997, it will still be crucial to ascertain exactly when he did so, in order to determine the number of days Saffold had remaining in his one-year limitation period. The number of days remaining may turn out to be less than the number of days between the denial of Saffold’s habeas petition by the California Supreme Court on May 27,1998, and the date Saffold filed his petition in federal court. If so, Saffold’s petition would be untimely. To determine this latter issue, the district court may have to address Saffold’s contention that he delivered his federal petition, which was filed on June 4, 1998, to prison officials on June 2, 1998. We leave these matters to the district court on remand.
REVERSED and REMANDED.
. We concluded that AEDPA’s statute of limitations could not commence running before the effective date of AEDPA, lest prisoners find themselves to be already barred by a limitation on the date it was enacted. See Calderon v. United States Dist. Court, 128 F.3d 1283, 1286-87 (9th Cir.1997), overruled on other grounds by Calderon v. United States Dist. Ct., 163 F.3d 530 (9th Cir.1998) (en banc), cert. denied, — U.S. -, 119 S.Ct. 1377, 143 L.Ed.2d 535 (1999).
. We review de novo the district court's dismissal of Saffold's petition on the ground that he has failed to satisfy the statute of limitations. Miles, 187 F.3d at 1105.
. Saffold contends that he did not receive notice of the denial by the Court of Appeal until November 10, 1997.
. There are two methods by which a petitioner may seek review by the California Supreme Court after a habeas petition is denied by the Court of Appeal. The preferred method is by a petition for review, but the petitioner is also free to file instead an original petition in the California Supreme Court. See Nino, 183 F.3d at 1006 n. 3. Saffold filed an original petition. He therefore was not governed by California’s Rule of Court 28(b), upon which the dissent relies, that requires a petition for review to be filed within ten days after the Court of Appeal’s decision became final.
. We note that the Supreme Court has granted certiorari in a case that may address this issue left open in Nino. See Bennett v. Artuz, 199 F.3d 116 (2d Cir.1999), cert. granted, U.S. -, 120 S.Ct. 1669, 146 L.Ed.2d 479 (2000).
. We note that at the time Saffold’s conviction became final, the California Supreme Court's standards for timeliness for filing petitions for habeas corpus petitions were not consistently applied. See Morales v. Calderon, 85 F.3d 1387, 1390-93 (9th Cir.1996).
. Our conclusion that Saffold is entitled to tolling for this entire period makes it unnecessary for us to address his argument that he is entitled to equitable tolling because of the delay in notifying him of the decision of the California Court of Appeal.