Esteban Gonzalez appeals from the judgment of the United States District Court for the Southern District of New York (Berman, J.) granting defendantsappellees’ motion to dismiss Gonzalez’s claims brought pursuant to 42 U.S.C. § 1988 and Bivens v. Six Unknown Named Agents of Federal Bureau of Narcotics, 403 U.S. 388, 91 S.Ct. 1999, 29 L.Ed.2d 619 (1971). Gonzalez claims that the district court erred in finding that the statute of limitations had run on the first of his two causes of action and in dismissing his second cause of action for improper venue. We VACATE and REMAND on the grounds that claims brought by an inmate under the Prison Litigation Reform Act (“PLRA”), 42 U.S.C. § 1997e(a), are entitled to equitable tolling during the time period the inmate is exhausting his administrative remedies, as required by the PLRA. We also VACATE the judgment insofar as it dismissed some of Gonzalez’s claims for improper venue and REMAND with instructions that the court transfer those claims to the United States District Court for the Eastern District of New York if the court deems it proper to do so upon reexamination of all of Gonzalez’s claims.
BACKGROUND
Beginning on February 28, 1999, Esteban Gonzalez, an inmate in the Metropolitan Correction Center (“MCC”) in lower Manhattan, was confined to the MCC’s special housing unit (“SHU”). Gonzalez maintains that he was confined in the SHU for two and a half years, after which he was transferred to the Metropolitan Detention Center (“MDC”), in Brooklyn, New York, on July 24, 2001. Upon arriving at the MDC, Gonzalez alleges that he was immediately confined in that facility’s SHU, and remained there until his transfer out of the MDC nearly ten months later. Gonzalez claims that he was unlawfully confined in SHU for almost eleven hundred consecutive days.
A “special housing unit” separates inmates from the general population either via “administrative detention” or “disciplinary segregation.” 28 C.F.R. §§ 541.20, 541.22. Gonzalez was placed in administrative detention, a “non-punitive” form of separation, 28 C.F.R. § 541.21, whereby, Gonzalez claims, inmates are confined to their cells for 23 hours per day, privileges are limited, and handcuffs are mandatory whenever the SHU inmate is outside of his cell. Administrative detention is used when “the inmate’s continued presence within the general population would pose a serious threat to life, property, self, staff or other inmates, or to the security or orderly running of the institution.” 28 C.F.R. § 541.22(a).
In order to ensure inmates are placed in a SHU for cause, and once there, only for a limited period of time, federal regulations governing the Bureau of Prisons (“BOP”) designate that a Segregation Review Officer (“SRO”) be responsible for conducting a review of the administrative detention within three work days of its commencement, hold a hearing for each inmate confined for over seven continuous days, and “thereafter review these cases on the record (in the inmate’s absence) each week, and hold a hearing and review these eases formally at least every 30 days.” 28 C.F.R. § 541.22(c)(1). Whenever administrative detention extends beyond 30 days a psychiatric or psychological assessment is required in order to assess whether the inmate poses a threat to himself or others. Id. Administrative detention should only be imposed for short periods of time except when it is for the inmate’s protection or there are exceptional circumstances con*320cerning security or complex investigations, in which case a monthly report is required. Id. “The SRO shall release an inmate from administrative detention when reasons for placement cease to exist.” Id.
Gonzalez, pro se, filed a Bivens complaint in the United States District Court for the Southern District of New York on May 31, 2005 against Dennis Hasty, warden of the MCC during Gonzalez’s confinement, who then became the warden of MDC shortly before Gonzalez was transferred to that institution. Gonzalez also named as defendants correctional and mental health staff in both facilities. The verified complaint alleged, inter alia, that the defendants failed to conduct segregation review hearings during Gonzalez’s SHU confinement in the MCC and the MDC, falsely completed and furnished Gonzalez records of hearings that never occurred, and at no point conducted meaningful psychological assessments. The complaint raised two separate claims, the first addressing his treatment at the MCC (in Manhattan), and the second focusing on the MDC (in Brooklyn). Gonzalez alleged that the reason for this mistreatment by two separate penal facilities was a conspiracy engineered by Hasty as retribution for Gonzalez’s allegations that Hasty was a racist. The consequence of the defendants’ conspiratorial activities, Gonzalez pleaded, were numerous violations of his First, Fifth and Eighth Amendment rights. Gonzalez alleged that he exhausted his administrative remedies on August 8, 2002.
Following a substantial delay arising from Gonzalez’s failure to effect proper service, Defendants moved to dismiss Gonzalez’s MCC claims as time-barred by a three-year statute of limitations, and the MDC claims on the grounds of improper venue. They asserted that the last date upon which Gonzalez could base any of his claims against the MCC defendants was July 2001 when he was transferred to the MDC, and that the statute of limitations, therefore, expired in July of 2004. Gonzalez, through counsel, argued in response that his claims were timely under the continuing violation doctrine, adding that he “was compelled to exhaust his administrative remedies prior to filing his lawsuit.” 1 Gonzalez pointed to the PLRA, which mandates that “[n]o action shall be brought with respect to prison conditions under section 1983 of this title, or any other Federal law, by a prisoner ... until such administrative remedies as are available are exhausted.” 42 U.S.C. § 1997e(a). And relying on the Fifth Circuit’s decision in Harris v. Hegmann, 198 F.3d 153, 157-59 (5th Cir.1999) (reversing the dismissal of a prisoner’s civil rights suit on grounds that his exhaustion of administrative remedies tolled the applicable statute of limitations), he argued that he *321had complied with the PLRA and that this “had the effect of tolling the limitations period.” As for the defendants’ allegations of improper venue, Gonzalez argued that his injuries suffered in the MDC were a continuation of those begun in the MCC, and that dismissal would result in a miscarriage of justice.
In February 2007, Magistrate Judge Ellis issued a report and recommendation stating that Gonzalez’s “allegations of a conspiracy at the MCC ... would be barred by the three year statute of limitations,” and “any conspiracy to deprive [Gonzalez] of his constitutional rights at the MDC would constitute a new conspiracy, and the Southern District would not be the proper venue.” The magistrate judge also found that Gonzalez “fail[ed] to establish a provable claim.” Gonzalez filed an objection to the report, arguing that: (1) under the continuing violation doctrine his claims were still timely, (2) venue was proper because of a “sufficient connection between the offending conduct and the district in which the action [had] been filed,” and (3) he had made sufficient factual allegations to support his causes of action.
The district court found that, even assuming Gonzalez had shown the “compelling circumstances” necessary to prevail on a continuing violation theory, his MCC claim nonetheless ripened when he was transferred out of the MCC on July 24, 2001, and any constitutional violations that allegedly occurred at the MDC would constitute a new conspiracy. Gonzalez v. Hasty, 2007 WL 914238, at *2-3, 3, 2007 U.S. Dist. LEXIS 21668, at *8, 9 (S.D.N.Y. Mar. 27, 2007). The court declined to reach Gonzalez’s exhaustion of administrative remedies argument “because, as noted ..., the Southern District of New York is not the proper venue for determination of the MDC Claim.” Id. at *3 n. 5, 2007 U.S. Dist. LEXIS 21668, at *10 n. 5. The district court failed to address, however, whether tolling of the statute of limitations should apply to Gonzalez’s MCC claims, which arose in Manhattan and where venue was proper. The district court dismissed Gonzalez’s MDC’s claims for improper venue, finding that none of the events or occurrences giving rise to the claims occurred in the Southern District of New York. Id. at *3, 2007 U.S. Dist. LEXIS 21668, at *11.
DISCUSSION
A. Standard of Review
We review de novo a district court’s grant of a motion to dismiss under Rule 12(b)(6) of the Federal Rules of Civil Procedure, accepting as true all allegations in the complaint and drawing all reasonable inferences in favor of the non-moving party. Vietnam Ass’n for Victims of Agent Orange v. Dow Chem. Co., 517 F.3d 104, 115 (2d Cir.2008). When the district court makes a venue determination on the basis of the pleadings and affidavits, we review de novo the legal question of whether petitioner has established a prima facie case that venue was proper. Gulf Ins. Co. v. Glasbrenner, 417 F.3d 353, 355 (2d Cir. 2005).
B. Tolling the Statute of Limitations
Gonzalez was transferred from the MCC to the MDC on July 24, 2001, and his complaint was not received by the court until May 31, 2005. Absent tolling, therefore, his claims against the MCC officials would be barred by the three-year statute of limitations applied by federal courts sitting in New York to Bivens claims. See Kronisch v. United States, 150 F.3d 112, 123 (2d Cir.1998) (“Federal Courts in New York apply a three-year statute of limitations period to Bivens claims.”). Gonzalez asserts that the statute of limitations *322should be tolled for the time period during which he was actively exhausting his administrative remedies, and that because he filed' his complaint less than three years after he had exhausted all of his administrative remedies, all of his claims are timely-
A statute of limitations provides an affirmative defense, and the burden is on the defendant to establish when a federal claim accrues. See Fed.R.Civ.P. 8(c). Notwithstanding that exhaustion is an affirmative defense not required to be pleaded in an inmate’s complaint, Jones v. Bock, 549 U.S. 199, 216, 127 S.Ct. 910, 166 L.Ed.2d 798 (2007), Gonzalez did plead it. See Complaint ¶ 30. We thus accept as true that on the stated date, August 8, 2002, Gonzalez exhausted his administrative remedies. See Dow Chem. Co., 517 F.3d at 115.
We have not previously determined whether the statute of limitations in a civil action by an inmate should be tolled during the time it takes the inmate to exhaust his administrative remedies under the PLRA. See Sims v. Goord, 151 Fed.Appx. 12, 14 (2d Cir.2005) (unpublished summary order) (recognizing that is unsettled in this Circuit whether a statute of limitations for a civil rights claim should be tolled while an inmate exhausts his administrative remedies). “Statutes of limitations are generally subject to equitable tolling where necessary to prevent unfairness to a plaintiff who is not at fault for her lateness in filing.” Veltri v. Bldg. Sew. 32B-J Pension Fund, 393 F.3d 318, 322 (2d Cir.2004). “Equitable tolling is an extraordinary measure that applies only when plaintiff is prevented from filing despite exercising that level of diligence which could reasonably be expected in the circumstances.” Id. (emphasis added). Our sister circuits that have squarely confronted the question presented here have answered in the affirmative, holding that tolling is applicable during the time period in which an inmate is actively exhausting his administrative remedies. See Brown v. Valoff, 422 F.3d 926, 942-43 (9th Cir.2005); Clifford v. Gibbs, 298 F.3d 328, 332 (5th Cir.2002); Johnson v. Rivera, 272 F.3d 519, 522 (7th Cir.2001); Brown v. Morgan, 209 F.3d 595, 596 (6th Cir.2000).2
Defendants assert that we need not decide whether to adopt an exhaustion toll for claims filed under the PLRA. Assuming arguendo equitable tolling is applicable, defendants argue that Gonzalez’s claim still fails because BOP regulations provide an administrative remedy period, “at the long end of the spectrum,” of one hundred and forty days from the filing of a remedy request, while Gonzalez’s claim implicates an administrative remedy period in excess *323of three hundred days. The PLRA’s administrative remedy program for inmate grievances, 28 C.F.R. §§ 542.11-542.18, requires that an inmate first attempt resolution of his or her grievance through informal channels before submitting a Request for Administrative Remedy (“RAR”). 28 C.F.R. § 542.13(a). Should informal remedies prove unsuccessful, the inmate has twenty days from the occurrence of the incident to submit an RAR, although an extension may be allowed where the inmate demonstrates a valid reason for delay. Id., § 542.14. The warden has 20 calendar days to respond to an RAR and, if not satisfied with the warden’s response, the inmate may appeal to the appropriate regional director within 20 calendar days of the date the warden signs the response. Id., §§ 542.15(a), 542.18. If not satisfied with the regional director’s response, the inmate may appeal to the general counsel within 30 calendar days of the date the regional director signs the response. Id., § 542.15(a). Once an appeal is filed, the regional director must respond within 30 calendar days and the general counsel within 40 calendar days, and if the time to respond is insufficient, it may be extended once by 20 days at the institution level, 30 days at the regional level, and 20 days at the central office level. Id., § 542.18. Upon the inmate’s showing of a valid reason for delay, all the deadlines may be extended. Id., § 542.15(a).
Under this latter provision, therefore, the time for achieving a resolution under the PLRA could be considerably longer than 140 days. In some instances, it is certainly possible that a full three years could pass while an inmate exhausts his administrative remedies. Cf. Abney v. McGinnis, 380 F.3d 663, 667 (2d Cir.2004) (“[EJxhaustion may be achieved in situations where prison officials fail to timely advance the inmate’s grievance or otherwise prevent him from seeking his administrative remedies.... ”). Defendants’ assertion that there is a statutory maximum time period beyond which equitable tolling will not save a claim thus finds no support in the applicable regulations, and certainly not in juxtaposition to the allegation in the complaint that Gonzalez’s administrative remedies were not exhausted until August 8, 2002.
As noted, the Ninth, Fifth, Seventh, and Sixth Circuits have all adopted the rule that equitable tolling is applicable to the time period during which a prisoner-plaintiff is exhausting his administrative remedies pursuant to the PLRA. See Brown, 422 F.3d at 942-43; Clifford, 298 F.3d at 332; Johnson, 272 F.3d at 522; Brown, 209 F.3d at 596.3 “The ‘catch-22’ ... is self-evident: the prisoner who files suit ... prior to exhausting administrative remedies risks dismissal based upon § 1997e; whereas the prisoner who waits to exhaust his administrative remedies risks dismissal based upon untimeliness.” Johnson, 272 F.3d at 522. Indeed, the exhaustion requirement in some circumstances may be nothing other than a “legal cause which prevent[s] the courts or their officers from taking cognizance of or acting on [a] plaintiffs action.” Harris, 198 F.3d at 158 (quoting Burge v. Parish of St. Tammany, 996 F.2d 786, 788 (5th Cir. 1993) (internal quotations omitted)). Furthermore, any other interpretation of the PLRA could “permit [prison officials] to exploit the exhaustion requirement through indefinite delay in responding to grievances.” Lewis v. Washington, 300 F.3d 829, 833 (7th Cir.2002) (internal quotations omitted). For these reasons, we join our sister circuits and hold “that the *324applicable statute of limitations must be tolled while a prisoner completes the mandatory exhaustion process.” Brown, 422 F.3d at 943.
Applying this rule here raises a problem, however. Although we accept as true Gonzalez’s allegation that he exhausted all of his administrative remedies by August 8, 2002, the record is devoid of any facts indicating when Gonzalez first raised his administrative claims, thus initiating the exhaustion process. And because the date on which Gonzalez first raised his administrative claims demarcates the commencement of the period of time during which he was actively exhausting those claims, this fact — which is absent from the record — controls whether Gonzalez’s MCC claims are timely. That is, under the rule we articulate today, the applicable three-year statute of limitations is tolled only during that exhaustion period and not during the period in between the accrual of those claims and when Gonzalez began the administrative remedy process. See Brown, 209 F.3d at 596.
We cannot resolve this issue on the existing record. But because it is entirely possible that Gonzalez raised his administrative claims sufficiently in advance of August 8, 2002, so as to render his MCC claims timely, we vacate the district court’s dismissal of those claims and remand with instructions that the court determine when Gonzalez initiated his administrative proceedings and whether, based on that date, his MCC claims are timely.4
C. Venue
Under 28 U.S.C. § 1406(a), district courts are instructed to dismiss an action brought in the wrong venue “or if it be in the interest of justice, transfer such case to any district or division in which it could have been brought.” In a Bivens action, venue is governed by 28 U.S.C. § 1391(b), which provides that where jurisdiction is not founded on diversity of citizenship, a civil action may be brought only in “a judicial district in which a substantial part of the events or omissions giving rise to the claim occurred.” We held in Daniel v. American Board of Emergency Medicine, 428 F.3d 408, 436 (2d Cir.2005), that while “[ejourts enjoy considerable discretion in deciding whether to transfer a case in the interest of justice ... [a] ‘compelling reason’ for transfer is generally acknowledged when a plaintiffs case, if dismissed, would be time-barred on refiling in the proper forum.” Nonetheless, we should abstain from fashioning such a remedy when that case is a “sure loser.” Moreno-Bravo v. Gonzales, 463 F.3d 253, 263 (2d Cir.2006).
In dismissing Gonzalez’s MDC claims on the grounds of improper venue, the district court found that “any conspiracy to deprive Gonzalez of his constitutional rights at the MDC would constitute a new conspiracy ... involving a different time period and a different group of Defendants.” Gonzalez, 2007 WL 914238, at *3, 2007 U.S. Dist. LEXIS 21668, at *9. Clearly, if the claims must be re-filed in the *325Eastern District of New York, the only forum in which a substantial part of Gonzalez’s MDC claims arose, the action would be time-barred regardless of the time it has taken him to exhaust administrative remedies. Gonzalez alleges nearly eleven hundred uninterrupted days of SHU confinement. In light of BOP regulations stipulating that “[a]dministrative detention is to be used only for short periods of time except where an inmate needs long-term protection ..., or where there are exceptional circumstances” we decline to find that Gonzalez’s case is a “clear loser.” 28 C.F.R. § 541.22(c); Moreno-Bravo, 463 F.3d at 263. We instruct the district court on remand, therefore, that if on reexamination of the entirety of plaintiffs claims it determines that venue for the MDC claims is still improper in the Southern District of New York, then it shall transfer Gonzalez’s MDC claims to the United States District Court for the Eastern District of New York.
CONCLUSION
For the foregoing reasons, we VACATE the District Court’s grant of defendantsappellees’ motion to dismiss, and REMAND for factual findings on the length of the administrative exhaustion period, its effect on the applicable statute of limitations, and for such further action as may be appropriate. In addition, the District Court shall transfer Gonzalez’s MDC claim to the United States District Court for the Eastern District of New York if it deems it proper to do so upon reexamination of Gonzalez’s claims.
. Gonzalez asserted that because Warden Hasty was the "thread that tie[d] all of the[] allegations together," the continuous violation began with his February 1999 incarceration at the MCC and continued until his transfer out of the MDC in May 2002. See Nat’l R.R. Passenger Corp. v. Morgan, 536 U.S. 101, 118, 122 S.Ct. 2061, 153 L.Ed.2d 106 (2002) (holding that in the context of a hostile work environment claim filed under Title VII of the Civil Rights Act of 1964 only one incident comprising the hostile work environment need fall within the relevant limitations period because the continuing violation doctrine will render the entire claim timely); see also Shomo v. City of New York, 579 F.3d 176, (2d Cir.2009) (applying the continuing violation doctrine to deliberate indifference claims brought under 42 U.S.C. § 1983). We decline to decide on this record, however, whether the continuing violation doctrine allows the two confinements to be aggregated in order to preserve MCC claims that might otherwise have been lost absent prolonged tolling, and to lengthen the period of confinement in SHU.
. We note that as opposed to tolls that result in an entirely "intact” statute of limitations, e.g., a minority toll wherein once a claimant reaches the age of majority he still retains the entire statute of limitations applicable to the underlying claim, courts that toll PLRA claims apply the toll only to the time period in which the inmate is actively exhausting his administrative remedies, and not the anterior time period in between the accrual of the claim and when the prisoner initiated the administrative remedy process. See, e.g., Brown, 209 F.3d at 596 (“[T]he statute of limitations which applied to Brown’s civil rights action was tolled for the period during which his available state remedies were being exhausted.” (emphasis added)). For example, if an inmate’s claim accrues on January 1, 2010, and the inmate does not begin pursuing administrative remedies until December 1, 2010, any subsequent tolling that may be applicable would not include this eleven month period. Cf. Smith v. McGinnis, 208 F.3d 13, 17 (2d Cir.2000) (explaining that for habeas petitioners filing under 28 U.S.C. § 2254 the “tolling provision excludes time during which properly filed state relief applications are pending, but does not reset the date from which the one-year statute of limitations begins to run”).
. The Tenth Circuit has also adopted this rule, although not in a published opinion. See Roberts v. Barreras, 109 Fed.Appx. 224 (10th Cir.2004).
. Assuming that Gonzal'ez’s MCC claims accrued on July 24, 2001 (the date he was transferred out of the MCC), those claims are timely only if the three-year statute of limitations period was tolled for at least 312 days, since Gonzalez filed his complaint on May 31, 2005 and, absent tolling, the limitations period expired on July 24, 2004 (July 24, 2004 to May 31, 2005 = 312 days). Accordingly, assuming that Gonzalez finished exhausting his administrative remedies on August 8, 2002, the length of that exhaustion period— i.e., the period of time between when Gonzalez initiated his administrative claims and when he exhausted those claims on August 8, 2002 — must be at least 312 days so as to render his MCC claims timely; that would be the length of time during which the three-year statute of limitations would be tolled.