Low-income residents of the City of Pomona, California, bring this appeal from a judgment of the district court dismissing a suit against the City of Pomona and the Department of Housing and Urban Development (HUD), and various officials of each entity. We conclude that the complaint sets forth facts which, if true, constitute adequate grounds for relief against HUD and the named federal appellees, and therefore we reverse the order of dismissal as to those parties. We reverse dismissal also as to the nonfederal appellees.
Background
The appellants brought suit for declaratory and injunctive relief, claiming that HUD illegally had approved Pomona’s application for a block grant under Title I of the Housing and Community Development Act of 1974, 42 U.S.C. §§ 5301-5317 (HCDA). The HCDA authorizes the Secretary of HUD to make grants to local governments to help finance community development programs. Id. § 5303. Housing assistance is not an activity for which block grant funds may be obtained, id. § 5305, but such programs are provided indirectly by statutory provisions which impose certain conditions on block grants. Section 5304(a)(4) provides that an applicant must submit a housing assistance plan (HAP). In the HAP the applicant must survey its housing, determine the housing needs of low-income and other disadvantaged persons and families, and set “a realistic annual goal for the number of dwelling units or persons to be assisted, including . . . (ii) the sizes and types of housing projects and assistance best suited to the needs of lower-income persons in the community . . . .’’Id. § 5304(a)(4)(B). Funding for HAP commit*944ments must be obtained from such sources as section 8 of Title II of the HCDA.
On receiving a completed application for a block grant under section 5303, the Secretary may not approve it if, with reference to the HAP,
(1) on the basis of significant facts and data, generally available and pertaining to community and housing needs and objectives, the Secretary determines that the applicant’s description of such needs and objectives is plainly inconsistent with such facts or data; or
(2) on the basis of the application, the Secretary determines that the activities to be undertaken are plainly inappropriate to meeting the needs and objectives identified by the applicant pursuant to subsection (a) of this section; or
(3) the Secretary determines that the application does not comply with the requirements of this chapter or other applicable law or proposes activities which are ineligible under this chapter.
Id. § 5304(c).
Plaintiffs claimed that Pomona’s HAPs in its block grant applications for the years 1975 and 1976 satisfied neither the “best suited” standard of section 5304(a)(4)(B) nor the plainly inappropriate standard of section 5304(c)(2), and that HUD’s approval of the application was unlawful and an abuse of discretion.
Appellants prayed for a declaration that HUD’s approval of the applications was unlawful and that Pomona was required to expand housing assistance opportunities for low-income persons as a condition to its acceptance of funds under Title I of the HCDA. Appellants also sought an injunction prohibiting HUD from disbursing Title I funds to Pomona and preventing Pomona from spending any such funds until the City met its housing assistance obligations under the Act.
The district court granted the federal and nonfederal appellees’ motions to dismiss the action, and plaintiffs brought this appeal.
Standing
To establish standing plaintiffs must show that they “personally ha[ve] suffered some actual or threatened injury as a result of the putatively illegal conduct of the defendant . . . that is likely to be redressed if the requested relief is granted.” Gladstone Realtors v. Village of Bellwood, 441 U.S. 91, 99-100, 99 S.Ct. 1601, 1608, 60 L.Ed.2d 66 (1979); Duke Power Co. v. Carolina Environmental Study Group, 438 U.S. 59, 98 S.Ct. 2620, 57 L.Ed.2d 595 (1978); Bowker v. Morton, 541 F.2d 1347 (9th Cir. 1976).
The nonfederal appellees initially claim that plaintiffs have not shown that their injury was caused by the City’s conduct. The City argues, in essence, that the plaintiffs’ injury is lack of low-cost housing and that this condition predated the allegedly illegal block grant and was not caused by it.
This argument is meritless. Causation sufficient to confer standing may result from a defendant’s acts or omissions. Village of Arlington Heights v. Metropolitan Development Corp., 429 U.S. 252, 261, 97 S.Ct. 555, 561, 50 L.Ed.2d 450 (1977). Plaintiffs claim that they were injured by the nonfederal appellees’ failure to expand housing assistance for low-income persons. This withholding of a benefit which plaintiffs claim that the nonfederal appellees had an affirmative duty under the HCDA to provide is sufficient to establish causation.
The nonfederal appellees say further that the remedies sought would not necessarily cure the injuries alleged. The City claims that if the plaintiffs are successful in this action, it might decide to forgo block grant funds altogether rather than alter its HAP.
We reject this argument. Municipal recipients of federal assistance may not so easily avoid challenges to their use of federal funds by threatening to opt out of the program. It is sufficient for standing purposes that the injury alleged here “can be traced to the challenged action of the defendant[s] and [is] not injury that results from the independent action of some third *945party not before the Court.” Simon v. Eastern Kentucky Welfare Rights Org., 426 U.S. 26, 41-42, 96 S.Ct. 1917, 1926, 48 L.Ed.2d 450 (1976); Sierra Club v. Andrus, 610 F.2d 581 (9th Cir. 1979), pet. for cert. filed, 48 U.S.L.W. 3699 (U.S. Apr. 29, 1980); Legal Aid Society v. Brennan, 608 F.2d 1319, 1335-36 (9th Cir. 1979), cert. den., -U.S.-, 100 S.Ct. 3010, 65 L.Ed.2d 1112 (1980).
Availability of Review of Agency Action
The federal defendants now concede that review of the Secretary’s decision to approve block grant assistance for the City of Pomona is available under the Administrative Procedure Act, and that subject matter jurisdiction against the federal defendants is available under 28 U.S.C. § 1331(a). See Russell v. Landrieu, 621 F.2d 1037, 1041 (9th Cir. 1980). In dismissing the action against the federal defendants, the district court sua sponte specified failure to exhaust administrative remedies as its sole ground of decision, though the federal appellees did not rely on such a theory below. The federal appellees make the concession here that dismissal on this ground was error because there are no express remedies to exhaust provided by the HCDA or the regulations promulgated thereunder.
The agency does ask us to affirm dismissal, however, on the ground that the record establishes that the approval of Pomona’s application was proper under the standards established by section 5304(c) of the HCDA and that summary judgment should have been granted in the Secretary’s favor.
There is no indication in the record that matters outside the pleadings were in fact presented to and considered by the district court, and so it is inappropriate to treat the court’s disposition of the motion to dismiss as a ruling of summary judgment. Fed. R. Civ. P. 12(b). The arguments advanced on appeal in support of the contention that summary judgment would have been appropriate have not been considered by the district court and we decline to consider them in the first instance. Lewis v. Transamerica Corp., 575 F.2d 237, 238 (9th Cir. 1978), aff’d in part, rev'd in part on other grounds, 444 U.S. 11, 100 S.Ct. 242, 62 L.Ed.2d 146 (1979); Hector v. Wiens, 533 F.2d 429, 433 (9th Cir. 1976).
Mootness
The federal appellees claim the action is moot because block grant funds have been disbursed to the City which has already expended most of them. We disagree.
If appellants establish that the Secretary has not followed the statute with reference to HAP requirements, the judgment would have an effect on HUD’s review of Pomona’s future applications for Title I funds, and its accompanying HAPs. HUD regulations provide that the community’s failure to meet past obligations can result in conditioning of “approval of a succeeding year’s application.” 24 C.F.R. §§ 570.909(e)(2), (f)(2), 570.910(b)(9), & (b)(10). The regulations, moreover, include a prospective requirement that HAPs in future years address goals not met in the past. 24 C.F.R. § 570.306(b)(5). Thus, if the HAPs submitted by Pomona with its 1975 and 1976 applications are found to have been inadequate, the City would be required to meet the goals not satisfied in past years in order to qualify for additional block grants. We therefore conclude that the action is not moot.
Scope of Review and Available Remedies
The district court may find it appropriate to consider the necessity of injunctive relief to prevent HUD from disbursing future funds to the City, absent compliance by the agency with the controlling statute. The necessity of such extensive relief, however, must be determined in the first instance by the district court.
On remand, the jurisdiction of the court will be confined to the scope of review set forth in the relevant portions of 5 U.S.C. § 706, including a determination of whether or not the agency has acted in a manner which is arbitrary and capricious or not in accordance with law, or without observance *946of procedures required by law. 5 U.S.C. §§ 706(2)(A), (D). In this respect the court’s review function is a narrow one. Citizens to Preserve Overton Park v. Volpe, 401 U.S. 402, 91 S.Ct. 814, 28 L.Ed.2d 146 (1970); East Oakland-Fruitvale Planning Council v. Rumsfeld, 471 F.2d 524, 533 (9th Cir. 1972). The gravamen of the complaint appears to be that the agency has failed to follow the steps required by statute in the approval of grants, and if the district court finds the allegations of the complaint to be true, it may conclude that relief should be confined to an order directing the agency to comply with the statute in a manner that the agency determines appropriate in the exercise of its own discretion. We think any declaratory or injunctive relief should be framed in such a manner that the agency retains the right to exercise its discretion in determining what relief against the City is appropriate, and in determining further whether or not to invoke the procedures for noncompliance specified by § 5311 of the HCDA. It is appropriate for the agency to make the initial determination of what corrective measures should be taken if block grant funds are found to have been received improperly, and the district court may conclude that no injunctive relief is needed. We note that the HCDA authorizes the Secretary to refer to the Attorney General those cases in which previously expended funds should be recovered, 42 U.S.C. § 5311(b), but that, too, is a matter for the agency’s initial determination. The denial of further funding even in acts with such critical federal policies as the State and Local Fiscal Assistance Act of 1972, 31 U.S.C. § 1242(a), is usually deemed the step of last resort, see E. McQuillin, The Law of Municipal Corporations, § 122.210a at 152 (3d ed. 1979), and it would appear that to require repayment of funds already spent is even more severe. The validity and necessity of such measures are properly left to the agency in the first instance. The court should frame any judgment or decree directly to the agency in a way that preserves both the right of the agency to make a determination of noncompliance pursuant to section 5311 of the HCDA and the jurisdiction of this court to review the agency’s findings and conclusions under section 5311(c).
The district court may determine that the City should be a party to this suit in order to grant complete relief, and we therefore reverse the order dismissing the City from the suit.1 If the court finds that appropriate relief may be provided by an order directed exclusively to the agency, it can reconsider the necessity for an order dismissing the City from the action.
REVERSED and REMANDED.
. One question that the district court should consider on remand is whether the plaintiffs have an implied cause of action under the HCDA which they may assert directly against the nonfederal appellees.. See Cort v. Ash, 422 U.S. 66, 95 S.Ct. 2080, 45 L.Ed.2d 26 (1975); see also Transamerica Mortgage Advisors, Inc. v. Lewis, 441 U.S. 11, 100 S.Ct. 242, 62 L.Ed.2d 146 (1979); Touche Ross & Co. v. Redington, 442 U.S. 560, 99 S.Ct. 2479, 61 L.Ed.2d 82 (1979); Cannon v. University of Chicago, 441 U.S. 677, 99 S.Ct. 1946, 60 L.Ed.2d 560 (1979); Falzarano v. United States, 607 F.2d 506 (1st Cir. 1979). The district court did not reach this question below because of its erroneous conclusion that it lacked subject matter jurisdiction over the claims against the nonfederal appellees. We think that the court below had subject matter jurisdiction under 28 U.S.C. § 1337 because the commerce clause is a significant source of the congressional power used to enact the HCDA. See Murphy v. Colonial Federal Savings & Loan Ass’n, 388 F.2d 609, 615 (2d Cir. 1967); 42 U.S.C. § 5301(c) (1976).
In supplemental briefs filed subsequent to oral argument, appellants argue that they also may assert a private cause of action against the nonfederal appellees under 42 U.S.C. § 1983 (1976). We leave to the district court to consider in the first instance whether appellants can assert such an action in light of the recent Supreme Court opinion in Maine v. Thiboutot, - U.S. -, 100 S.Ct. 2502, 65 L.Ed.2d 555 (1980).