MEMORANDUM **
James E. Crittenden appeals the district court’s dismissal of his 42 U.S.C. § 1983 action for failure to exhaust administrative remedies. We affirm.
Crittenden argues the district court erred in dismissing the action because even though he filed his initial complaint on March 4, 2002, before he exhausted his administrative remedies on May 14, 2002, he later filed an amended complaint on July 12, 2002 after he exhausted his administrative remedies. Under 42 U.S.C. § 1997e(a), a prisoner must exhaust administrative remedies “before the filing of a complaint.” McKinney v. Carey, 311 F.3d 1198, 1199 (9th Cir.2002). “[A] prisoner does not comply with this requirement by exhausting available remedies during the course of the litigation.” Id. Exhaustion in cases covered by section 1997e(a) is mandatory. Id. Crittenden was required to exhaust administrative remedies before commencing the action; his failure to do so properly resulted in dismissal of the action without prejudice.
Even assuming Wyatt v. Terhune, 315 F.3d 1108, 1114 (9th Cir.2003), and Rand v. Rowland, 154 F.3d 952, 960-61 (9th Cir.1998), apply to motions to dismiss for failure to exhaust administrative remedies, *907the notice provided by the magistrate judge to Crittenden was sufficient.
AFFIRMED.