Plaintiff Mayer sought to construct rental housing for low-income families under 42 U.S.C. § 1437f on land bordering defendants’ neighborhood. Defendants opposed the development in a series of administrative proceedings and court actions, see Brister v. Council of City of Tacoma, 27 Wash.App. 474, 619 P.2d 982 (1980), but plaintiff was ultimately allowed to proceed. Plaintiff then filed this suit under 42 U.S.C. § 1985(3) to recover damages from defendants for an alleged conspiracy to deny rights established by section 1437f by misusing and abusing administrative and judicial proceedings to delay plaintiff’s project.
Defendants moved to dismiss the complaint and for judgment on the pleadings under Federal Rules of Civil Procedure 12(b)(6) and 12(c), contending plaintiff lacked standing and had failed to state a claim under 42 U.S.C. § 1985(3), and that defendants’ actions were protected by the first amendment. Defendants also asked for attorney’s fees under 42 U.S.C. § 1988.
The district court dismissed for lack of standing, expressly refusing to rule on other grounds for dismissal. The court also awarded defendants attorney’s fees, stating that it did so “after consideration of the entire record.” Plaintiff challenges only the award of attorney’s fees.
42 U.S.C. § 1988’s authorization of an award of attorney’s fees applies differently to prevailing defendants than to prevailing plaintiffs. Plaintiffs prevailing in a civil rights action “should ordinarily recover an attorney’s fee unless special circumstances would render such an award unjust,” Christiansburg Garment Co. v. EEOC, 434 U.S. 412, 416-17, 98 S.Ct. 694, 698, 54 L.Ed.2d 648 (1978), but a defendant should be awarded fees “not routinely, not simply because he succeeds, but only where the action brought is found to be unreasonable, frivolous, meritless or vexatious.” Id. at 421, 98 S.Ct. at 700; Ellis v. Cassidy, 625 F.2d 227, 230 (9th Cir.1980).
Because the district court refused to consider any issue but standing and did not inform plaintiff it intended to consider matter outside the pleadings in deciding this issue, plaintiff contends that in determining whether to award attorney’s fees the court was similarly limited to deciding on the pleadings alone whether plaintiff’s position on the single question of standing was “unreasonable, frivolous, meritless or vexatious”; and that the court erred because it considered “the entire record,” which included references to factual matters outside the pleadings as well as grounds for dismissal other than standing.
A motion under Federal Rule of Civil Procedure 12(b)(6) or 12(c) may be treated as a motion for summary judgment only if the court affords all parties reasonable notice. “In evaluating the adequacy of notice, this circuit has determined from the record whether the party against whom summary judgment was entered was fairly apprised that the court would look beyond the pleadings and thereby transform the 12(b) motion to dismiss into one for summary judgment.” Portland Retail Druggists Association v. Kaiser Foundation Health Plan, 662 F.2d 641, 645 (9th Cir.1981).
We agree with plaintiff that summary judgment was implied if the court considered matters outside the pleadings in concluding that plaintiff’s suit was “frivolous, harassing and groundless.” We also *1022agree with plaintiff that he did not have adequate notice that the court would go beyond the pleadings. The court’s action must therefore be reviewed on the basis of the pleadings alone. We do not agree with plaintiff, however, that the only issue before the court was plaintiff’s standing. Plaintiff had the opportunity to respond fully to all legal grounds presented in defendants’ motions to dismiss and for judgment on the pleadings. We can uphold the district court’s award of attorney’s fees, therefore, only if we can conclude, based on the pleadings alone, that plaintiff’s suit as a whole was “unreasonable, frivolous, merit-less or vexatious.”
Section 1985(3) “creat[es] a cause of action for any tortious interference with a legally protected right if motivated by the requisite class-based animus.” Life Insurance Co. of North America v. Reichardt, 591 F.2d 499, 503 (9th Cir.1979). Defendants contend plaintiff’s suit was “unreasonable, frivolous, meritless or vexatious” because plaintiff failed to allege (1) the requisite class-based animus; (2) a legally protected right or standing to assert the right if it existed; and (3) a tortious interference with a legally protected right.
Plaintiff alleged defendants conspired to oppose his project out of class-based animus against lower-income families. Defendants contend lower-income families are not a class protected by section 1985(3) and that Congress has no power to reach a conspiracy to discriminate against that class. We have noted that “[cjourts construing § 1985(3) have not limited its protection to racial or otherwise suspect classifications,” Life Insurance Co. of North America v. Reichardt, 591 F.2d at 505, and have held that “women purchasers of disability insurance in California” constitute a protected class under section 1985(3). Id. While Reichardt did not reach the question of congressional power to reach the conspiracy alleged in that case, id. at 505-06, and Griffin v. Breckenridge, 403 U.S. 88, 91 S.Ct. 1790, 29 L.Ed.2d 338 (1971), limited its holding to conspiracies in violation of the thirteenth amendment, id. at 104-05, 91 S.Ct. at 1799-1800, the Court suggested that section 1985(3) could also reach conspiracies based on “otherwise class-based, invidiously discriminatory animus,” id. at 102, 91 S.Ct. at 1798. Plaintiff’s position that lower-income families constitute a class constitutionally protected by section 1985(3) was not legally frivolous.
Plaintiff contends that section 1437f, which authorizes assistance payments “[f]or the purpose of aiding lower-income families in obtaining a decent place to live and of promoting economically mixed housing,” creates a legal right to such housing protected by section 1985(3). The Seventh Circuit has held that section 1437f creates due process rights in certified tenants of housing financed under the statute, see Holbrook v. Pitt, 643 F.2d 1261, 1278-79 (7th Cir.1981), and a district court has found “an intent on the part of the legislature to create a remedy for prospective tenants of these projects.” Allapattah Community Association v. Landrieu, 502 F.Supp. 436, 438 (S.D.Fla.1980). We conclude plaintiff’s allegation that section 1437f created legal rights cognizable under section 1985(3) was not frivolous.
Assuming a right to section 1985(3) housing existed, defendants contend plaintiff’s lack of standing is conclusively established by our statement in Canlis v. San Joaquin Sheriff's Posse Comitatus, 641 F.2d 711 (9th Cir.1981), that “the plaintiff must be a member of the class discriminated against to claim the benefits of § 1985(3).” Id. at 721. But the plaintiffs in Canlis did not assert standing in a representative capacity as did plaintiff in this case, and there is case law allowing standing for a suitable representative “when enforcement of a legal rule will interfere with the rights of third parties who lack an effective means of asserting their own rights.” Rhodes v. Robinson, 612 F.2d 766, 769 (3d Cir.1979). It was not frivolous for plaintiff to assert standing as a representative of prospective tenants of proposed section 1437f housing.
Plaintiff alleged defendants tortiously interfered with his proposed project by abusing administrative and judicial pro*1023ceedings. At least one court has indicated that an abuse of process that results in a deprivation of constitutional rights can give rise to a section 1983(5) action. Jennings v. Shuman, 567 F.2d 1213, 1220-21 (3d Cir.1977). While normally protected by the first amendment, the invocation of administrative or judicial proceedings may be tortious and actionable if employed for a purpose that is unlawful and is other than and in addition to the goal sought openly in the proceeding itself. See California Motor Transport Co. v. Trucking Unlimited, 404 U.S. 508, 513-15, 92 S.Ct. 609, 613-14, 30 L.Ed.2d 642 (1972); Ernest W. Hahn, Inc. v. Codding, 615 F.2d 830, 840-41 (9th Cir.1980); Batten v. Abrams, 28 Wash.App. 737, 745-46, 626 P.2d 984, 988-89 (1981). Plaintiff alleged defendants engaged in baseless opposition in various administrative and judicial proceedings to delay his project. Defendants vehemently dispute this characterization of their motives and claim plaintiff brought this suit solely to harass them. But the parties’ motivation, and therefore the merit of plaintiff’s suit, is a factual matter not resolvable on the pleadings. The cause of action alleged by plaintiff is not frivolous, and plaintiff’s suit is not vexatious on the face of the pleadings as a matter of law.
Defendants’ extensive argument that plaintiff’s suit was vexatious rests primarily on facts outside the pleadings. Since plaintiff did not have adequate notice that the court would go beyond the pleadings in making its section 1988 determination, the attorney fee award was inappropriate. Because plaintiff lacked notice, he did not, contrary to defendants’ argument, waive his right to present evidence by not requesting a hearing on attorney’s fees until after the order granting fees was entered. The case must be remanded to afford defendants an opportunity to make a showing sufficient to support the award of attorney’s fees.
Plaintiff also contends that even if attorney’s fees were properly awarded, the amount should have been discounted by the insurance coverage available to defendants. The contention is without merit. Ellis v. Cassidy, 625 F.2d at 230; Church of Scientology of California v. Cazares, 638 F.2d 1272, 1291 (5th Cir.1981).
REVERSED and REMANDED.