dismissal in Brooks may be counted as a strike under the plain language of § 1915(g). To the extent that the district court left it unclear that it considered all of the stated grounds for the dismissal in Brooks to be for appellant’s failure to state a claim, we have previously upheld a dismissal of a prisoner’s claims for damages on the basis that they were premature under Heck and failed to state a claim. See Davis v. Kan. Dep’t of Corr., 507 F.3d 1246, 1248, 1249 (10th Cir.2007). Thus, in Brooks, the action was dismissed for failure to state a claim and was a strike. Because appellant did not appeal, the dismissal counts from March 13, 2006, when appellant’s sixty days to appeal to the Seventh Circuit expired. See Jennings, 175 F.3d at 780; Fed. R.App. P. 4(a)(1)(B).
ii. Second Strike
Hafed v. Government of the State of Israel was a civil rights action filed by appellant in the Southern District of Indiana in June 2008. See D.C. No. 1:08— cv-00773, Doc. 1. The district court screened the complaint and dismissed it, ambiguously, under “§ 1915A(b).” Government of the State of Israel, D.C. No. 1:08-cv-00773, Doc. 5, at 3. The district court was not entirely clear as to the ground on which its dismissal was ultimately based, however. The court set out all the standards that could apply — frivolousness under § 1915A(b)(1), suing an immune defendant under § 1915A(b)(2), and failure to state a claim under § 1915A(b)(1). Government of the State of Israel, D.C. No. 1:08-cv-00773, Doc. 5, at 1.
The consideration of whether a dismissal based in part on 28 U.S.C. § 1915A(b)(2) because the defendant was immune from suit should count as a strike presents some complexity because that ground is not explicitly included in § 1915(g). We have previously observed, however, that a complaint could properly be dismissed by a district court sua sponte as frivolous, if it was clear from the face of the complaint that the defendant was absolutely immune from suit and no further factual development was required. Yellen v. Cooper, 828 F.2d 1471, 1476 (10th Cir.1987). Our determination that a particular dismissal constitutes a strike is not formalistic or mechanical; rather, we must consider the nature of the dismissal and, if the district court did not make it clear, whether the dismissal fits within the language of § 1915(g).
We construe the Southern District of Indiana’s order to mean that the immunity ground for dismissal was subsumed in frivolousness or appellant’s failure to state a claim, because appellant affirmatively asserted facts showing that he could not meet the expropriation exception to Israel’s immunity, so he had no “legally viable claimf.]” See Government of the State of Israel, D.C. No. 1:08-cv-00773, Doc. 5, at 3. We conclude that the district court’s dismissal in Government of the State of Israel is based on grounds listed in both § 1915A(b)(l) and § 1915(g), and it therefore counts as a strike. This strike counts from May 26, 2009, when the Supreme Court dismissed appellant’s petition for writ of certiorari. See Hafed v. State of Israel, — U.S. -, 129 S.Ct. 2439, 174 L.Ed.2d 226 (2009) (Mem.) (No. 08-9403).
iii. Third Strike
In addition, the Seventh Circuit dismissed appellant’s appeal in Hafed v. Government of the State of Israel, No. 08-2744. That court first denied appellant’s motion for leave to proceed ifp under Lee v. Clinton, 209 F.3d 1025, 1026-27 (7th Cir.2000), that is, as frivolous. See Government of the State of Israel, No. 08-2744, Doc. 17. When appellant did not pay