
    Neil HUNTERSON, Appellant v. Mary Keating DISABATO, (Former NJSPB Chairman); Andrew B. Consovoy, Esq., (Former NJSPB Chairman); Rachel Chowaniec, (Former NJSPB Bd. Member); Rolando Gomez-Rivera, (NJSPB Bd. Member); Frank Schumann, (Former NJSPB Bd. Member); Ruby J. Washington, (NJSPB Bd. Member); James N. Hogan, (Former NJSPB Bd. Member); Michael Carlin, Esq., (Former NJSPB Executive Dir.); Douglas Cheisa, Esq., (Former Executive Dir.); William Fauver, (Former Comm. NJDOC); Victor D’Ilio, (Former Chief NJDOC-BOP); Kathleen Weichnik, (Special Asst. To the Commissioner); Donald Roberts, (Supervisor NJDOC Laboratory); Gary Hilton, (Former NJDOC Chief of Staff); Debbie Faunce, (NJDOC Chief I/A); Michael Bokar, D.A.G.; James Harris, D.A.G.; Howard McCoach, D.A.G.; Mario Paparozzi, (NJDOC BOP, Asst. Chief/NJSPB Chairman); William Strollo, (NJDOC-BOP SPO); Paul Wentzel, (Former NJDOC-BOP DPS DO #7); Calvin Weatherby, (Former NJDOC-BOP ASPS DO # 7); Leonard Domanski, (Former NJDOC-BOP ADPS DO # 7); Vincent Piccurelli, (NJDOC-BOP SPO DO #7); Ron Holvey, (NJDOC I/A); Timothy Murphy, (NJSPB H.O.); Ronald Destefano, (NJDOC-BOP H.O.); Michael McKeen, (Former Administrator SSCF); Don Doherty, (NJDOC ISS); Peter W. Vanderstine, DSG (NJ State Police); John Doe # 1 (NJ State Police); John Doe # 2 (NJ State Police).
    No. 06-4409.
    United States Court of Appeals, Third Circuit.
    Submitted Under Third Circuit LAR 34.1(a) May 23, 2007.
    Filed June 20, 2007.
    
      Neil Hunterson, Draper, UT, pro se.
    Before: RENDELL, HARDIMAN and COWEN, Circuit Judges.
   OPINION

PER CURIAM.

In 2006, state inmate Neil Hunterson filed a pro se civil rights complaint in the District Court for the District of New Jersey against over two dozen officials of the New Jersey State Parole Board, New Jersey Department of Corrections and other state officials (hereinafter “the Defendants”). Hunterson alleged numerous constitutional and state violations arising from the Defendants’ conduct beginning in 1994 while Hunterson was incarcerated and/or on parole. Prior to service on the Defendants, the District Court sua sponte dismissed the complaint for failure to state a claim pursuant to 28 U.S.C. § 1915A(b)(l). The District Court found that Hunterson only alleged events occurring from 1994 to 2001, and thus the 2006 complaint was not filed within the New Jersey two-year statute of limitations. Hunterson filed a motion to amend the judgment, which the District Court denied. We have jurisdiction pursuant to 28 U.S.C. § 1291 and our review of the District Court’s dismissal is plenary. Tourscher v. McCullough, 184 F.3d 236, 240 (3d Cir.1999). We must accept Hunterson’s allegations as true and draw all reasonable inferences therefrom. See id.

Hunterson’s complaint alleges that the defendants violated his constitutional rights by various actions committed from 1994 through 2001, including actions during parole revocation proceedings and parole hearings between 1994 and 1998. See Complaint at 10-60. The complaint also asserts that the District Court granted habeas relief in 1998 with respect to the parole proceedings, that Hunterson was ordered released in 2001, that this Court reversed and remanded the habeas proceedings in 2002, and that in 2004 the District Court dismissed the matter as moot because Hunterson was arrested on new charges and returned to custody. See id. at 2, 43-44.

Although the statute of limitations is an affirmative defense, Robinson v. Johnson, 313 F.3d 128,135 (3d Cir.2002), a complaint can be dismissed for failure to state a claim if the allegations show that relief is barred under the relevant statute of limitations. See Jones v. Bock, — U.S. —, 127 S.Ct. 910, 920-21, 166 L.Ed.2d 798 (2007) (recognizing that “[wjhether a particular ground for opposing a claim may be the basis for dismissal for failure to state a claim depends on whether the allegations in the complaint suffice to establish that ground, not on the nature of the ground in the abstract”). Thus, a district court may sua sponte dismiss a claim as time-barred under 28 U.S.C. § 1915A(b)(l) where it is apparent from the complaint that the applicable limitations period has run. Hunterson’s § 1983 action is governed by the New Jersey two-year statute of limitations. See Gibson v. Superintendent of N.J. Dept. of Law & Public Safety-Division, 411 F.3d 427, 435 (3d Cir.2005).

Here, the last action alleged by Hunter-son occurred in 2001, making it apparent from the face of the Complaint that the two-year statute of limitations expired well before he filed suit in 2006. This is true even with respect to Hunterson’s challenge to the constitutionality of his parole revocation, which is subject to the delayed accrual rule of Heck v. Humphrey, 512 U.S. 477, 114 S.Ct. 2364, 129 L.Ed.2d 383 (1994), and its progeny. Under Heck, a plaintiff may not bring a § 1983 action for alleged unconstitutional confinement “if success in that action would necessarily demonstrate the invalidity of the confinement or its duration,” Wilkinson v. Dotson, 544 U.S. 74, 81-82, 125 S.Ct. 1242, 161 L.Ed.2d 253 (2005) (emphasis in original), unless the plaintiff demonstrates that the imprisonment was invalidated or called into question by a federal court’s issuance of a writ of habeas corpus. Heck, 512 U.S. at 486-87, 114 S.Ct. 2364. An action alleging that a parole revocation was constitutionally infirm falls into this category of cases. See Williams v. Consovoy, 453 F.3d 173, 177 (3d Cir.2006). The cause of action for these cases accrues-not at the time the plaintiff knew of or had reason to know of the injury, but at the time the imprisonment is invalidated. Gibson, 411 F.3d at 435; see also Wallace v. Kato, — U.S. —, 127 S.Ct. 1091, 1095, 166 L.Ed.2d 973 (2007) (cause of action accrues when plaintiff is able to “file suit and obtain relief ”) (emphasis added).

There is no possible scenario under which Heck’s delayed accrual rule would save Hunterson’s claim. To the extent the initial grant of habeas relief in 1998 (prior to this Court’s reversal in 2002) temporarily invalidated his imprisonment, any related cause of action expired in 2000. Even assuming, arguendo, that Hunterson’s apparent release on parole in 2001, see Complaint at 2, somehow renewed his cause of action, this Court’s subsequent reversal of the initial grant of habeas relief terminated Hunterson’s right to bring a § 1983 claim in 2002. Finally, because Hunter-son’s habeas petition was ultimately denied as moot, Hunterson’s imprisonment was never invalidated and any attempt to bring a § 1983 action after 2002 would be subject to the Heck bar.

Accordingly, we will affirm. Hunter-son’s motion for appointment of counsel is denied as moot. 
      
      . As the District Court recognized, the Third Circuit has never squarely addressed whether a district court may sua sponte dismiss a claim as time-barred under 28 U.S.C. § 1915A(b)(l). However, it is well-established that a district court may dismiss a civil rights suit for failure to state a claim where the facts alleged in the complaint plainly demonstrate that a cause of action has not been brought within the applicable limitations period. See Bethel v. Jendoco Const. Corp., 570 F.2d 1168, 1174 (3d Cir.1978). Furthermore, several other courts of appeals have affirmed sua sponte dismissals on statute of limitations grounds. See, e.g., Pino v. Ryan, 49 F.3d 51 (2d Cir.1995); Nasim v. Warden, Maryland House of Correction, 64 F.3d 951 (4th Cir. 1995).
     
      
      . We express no opinion as to whether Hunterson's release would render an otherwise timely claim permissible under Heck.
      
     