
    ISLAMIC SHURA COUNCIL OF SOUTHERN CALIFORNIA; Council on American Islamic Relations-California; Islamic Center of San Gabriel Valley; Islamic Center of Hawthorne; West Coast Islamic Center; Human Assistance and Development International, Inc.; Muzammil Siddiqi; Shakeel Syed; Hussam Ayloush; Mohammed Abdul Aleem; Rafe Husain, Plaintiffs-Appellees, v. FEDERAL BUREAU OF INVESTIGATION; United States Department of Justice, Defendants-Appellants.
    No. 12-55305.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted June 26, 2013.
    Filed July 31, 2013.
    
      Stuart F. Delery, Acting Assistant Attorney General, Andre Birotte, Jr., United States Attorney, Beth S. Brinkmann (argued), Deputy Assistant Attorney General, Michael S. Raab and Daniel Tenny, Department of Justice, Washington, D.C., for Defendants-Appellants.
    Ahílan T. Arulanantham (argued), ACLU Foundation of Southern California, Los Angeles, CA, for Plaintiffs-Appellees.
    Clare Pastore, USC Gould School of Law, Los Angeles, CA, for Amici Curiae Professors of Legal Ethics.
    Before: MARY M. SCHROEDER, RICHARD C. TALLMAN, and MILAN D. SMITH, JR., Circuit Judges.
   OPINION

PER CURIAM:

The Federal Bureau of Investigation (“FBI”) appeals the district court’s order granting the Islamic Shura Council of Southern California’s (“Shura Council”) motion for sanctions under Federal Rule of Civil Procedure 11(c). See Islamic Shura Council of S. Cal. v. FBI, 278 F.R.D. 538, 548 (C.D.Cal.2011). The FBI argues that the sanctions order must be reversed because the FBI could not avail itself of the safe harbor provision of Rule 11(c)(2). We agree, and consequently reverse the district court’s award of sanctions.

“An appellate court should apply an abuse-of-discretion standard in reviewing all aspects of a district court’s Rule 11 determination.” Cooter & Gell v. Hartmarx Corp., 496 U.S. 384, 405, 110 S.Ct. 2447, 110 L.Ed.2d 359 (1990). “A district court would necessarily abuse its discretion if it based its ruling on an erroneous view of the law or on a clearly erroneous assessment of the evidence.” Id.

A party may move for Rule 11 sanctions if its adversary makes a frivolous filing or otherwise makes a contention for an improper purpose. G.C. & KB. Investments, Inc. v. Wilson, 326 F.3d 1096, 1109 (9th Cir.2003). Such a motion may not be filed, however, unless there is strict compliance with Rule ll’s safe harbor provision. See Holgate v. Baldwin, 425 F.3d 671, 678 (9th Cir.2005) (holding that we “enforce [Rule ll’s] safe harbor provision strictly”); see also Ridder v. City of Springfield, 109 F.3d 288, 296 (6th Cir. 1997) (noting that “Rule 11 cases emerging in the wake of the 1993 amendments [to Rule 11] have found [compliance with] the ‘safe harbor’ provision to be an absolute requirement.”). That provision provides that any motion for sanctions must be served on the offending party at least 21 days before the motion is filed with the court. Fed.R.Civ.P. 11(c)(2). The safe harbor provision further dictates that the motion may not be filed if the offending party timely “withdraw[s] or appropriately correct[s]” the challenged contention during the safe harbor period. Id. The purpose of the safe harbor provision is to give the offending party an opportunity to correct or withdraw its problematic pleading, and “thereby escape sanctions.” Barber v. Miller, 146 F.3d 707, 710 (9th Cir.1998) (emphasis in original).

Rule 11 is intended to deter baseless filings in district court and imposes a duty of “reasonable inquiry” so that anything filed with the court is “well grounded in fact, legally tenable, and not interposed for any improper purpose.” Cooter & Gell, 496 U.S. at 393, 110 S.Ct. 2447 (internal quotation marks omitted). Therefore, fee sanctions compensate a party for the costs of enforcing the rule when the party taking the challenged position has refused to withdraw or correct it. Fed.R.Civ.P. 11(c)(2). Motions for Rule 11 attorney’s fees cannot be granted after the district court has decided the merits of the underlying dispute giving rise to the questionable filing. This is because once the court has decided the underlying dispute, the motion for fees cannot serve Rule ll’s purpose of judicial economy. See Advisory Committee’s Notes to the 1993 Amendments to Rule 11 (noting that a party may not move for Rule 11 sanctions after “judicial rejection of the offending contention”).

Shura Council argues that its motion complied with the safe harbor provision of Rule 11. Shura Council notes that it served its motion for sanctions on the FBI 25 days before it filed the motion with the district court. Shura Council further notes that the FBI did not withdraw or correct its challenged pleadings during this 25-day period. What Shura Council fails to observe, however, is that the FBI had already “corrected” the challenged pleadings and provided all the information it was obligated to provide to the district court before Shura Council filed its motion for sanctions. The FBI informed the court of the existence of additional documents previously in an in camera proceeding. Islamic Shura Council, 278 F.R.D. at 541. The district court ruled that the FBI should have told the court about these documents at the pleading stage of the litigation, when the FBI responded to Shura Council’s 2007 FOIA complaint with redacted documents the FBI claimed were “outside the scope” of Shura Council’s request. Islamic Shura Council of S. Cal v. FBI, 779 F.Supp.2d 1114, 1125 (C.D.Cal.2011); see also Islamic Shura Council II, 635 F.3d at 1166.

No party now disputes, however, that the FBI provided the district court with a complete and accurate account of the facts of this case during the in camera sessions. The district court concluded that, in light of the FBI’s in camera submissions, Shura Council was “not entitled to any further information regarding the Government’s previous searches for documents, and that the Government need not conduct any additional searches for responsive documents.” Islamic Shura Council, 278 F.R.D. at 542. Shura Council has not appealed that determination.

Shura Council moved for sanctions long after the district court had ruled on the adequacy of the government’s eventual compliance with FOIA, and a fortiori after it had ruled the FBI’s original response had been inadequate and misleading. See Islamic Shura Council II, 635 F.3d at 1163. We recognize that because of the in camera nature of the proceedings, Shura Council could not have moved for sanctions before the inadequacy of the FBI’s original response was made known to the court. Nevertheless, the motion for sanctions was made after “judicial rejection of the offending contention.” Advisory Committee’s Notes to the 1993 Amendments to Rule 11. The motion for sanctions should not have been granted.

The order granting the motion for sanctions is REVERSED and the order awarding fees VACATED.

Each party shall bear its own costs. 
      
      . The factual and procedural history of this case is described in the district court's order granting Shura Council's motion for sanctions. See Islamic Shura Council, 278 F.R.D. at 539-42; see also Islamic Shura Council of S. Cal. v. FBI ("Islamic Shura Council II"), 635 F.3d 1160, 1162-63 (9th Cir.2011).
     