This is an appeal from a district court judgment reversing a Medicaid disallowance decision of the Secretary of Health and Human Services. The appeal raises both a complex jurisdictional issue and a difficult question of statutory interpretation under the Medicaid Act. For the reasons that follow, we affirm the district court on the merits, yet vacate the monetary judgment assessed against the Secretary.
I. Introduction
The Medicaid program is a joint federal-state program. The states administer its day to day operation and the federal government pays part of the cost under an arrangement in which the Secretary “reimburses” the states in advance. If on audit the Secretary disallows certain expenditures as not covered by the Medicaid statute or regulations, the money paid in advance for those expenditures is withheld from subsequent advance reimbursements. The states’ decisions about what services to provide, in interaction with the Secretary’s disallowance decisions, determine in large part the nature and extent of the Medicaid program.
As authorized by the Medicaid Act, Massachusetts provides services to the mentally retarded in public institutions known as intermediate care facilities for the mentally retarded (“ICF/MR”). 42 U.S.C. § 1396d. Massachusetts Department of Mental Health (“DMH”) and Department of Education (“DOE”) personnel work together to provide these services, using a transdisciplinary approach designed, at least in part, to help the ICF/MR residents achieve some degree of independence and self-care. The mental health staff performs work pursuant to Massachusetts mental health statutes and regulations, and the education staff carries out duties pursuant to Chapter 766 of the Massachusetts St.1972, which relates to “special education.”
In two audits affecting the period July 1, 1978 through June 30, 1982, the Secretary took the position that all services provided by DOE personnel and contractors are per se “educational” and thus excluded from Medicaid coverage under the Secretary’s regulation in 42 C.F.R. § 441.13(b). The Secretary disallowed three service costs that are in dispute here:
1. Service delivery contracts with school committees and one regional vocational school to provide services required by Chapter 766 regulations that existing state staff could not provide,
2. Contracts to perform evaluation and monitoring functions required by Chapter 766, and
3. Salaries of DOE staff who work with ICF/MR residents in accordance with the goals of the “individual educational plans” required by Chapter 766.
Massachusetts appealed the disallowances to the Grant Appeals Board (GAB) of HHS. The GAB affirmed the disallowances, ruling that they result from the Secretary’s interpretation of his own regulation, which is entitled to great deference. See Massachusetts Department of Public Welfare, Grant Appeals Board Decision No. 438 (May 31,1983). On appeal, the District *799Court reversed, noting that the Secretary determines compliance with Medicaid regulations
by reference to state and federal education statutes and to the Commonwealth’s method of administering the services in question, rather than to the nature of the services themselves. This approach errs on the side of administrative convenience at the expense of compliance with the Medicaid statute____
Commonwealth of Massachusetts v. Heckler, 616 F.Supp. 687, 694 (D.Mass.1985) (emphasis supplied). The District Court ruled that Massachusetts should be reimbursed, according to the Medicaid statutory formula, for all of the service costs listed above. The Secretary appealed.
II. Jurisdiction
We have recently had the opportunity to consider the jurisdiction of district courts over the Secretary’s Medicaid disallowance decisions. See Commonwealth of Massachusetts v. Departmental Grant Appeals Board, 815 F.2d 778 (1987) (“Grant Appeals Board”). Grant Appeals Board held that the district court does not have jurisdiction to hear a Medicaid disallowance challenge that is wholly retrospective in nature, because such a challenge seeks “money damages.” And under the general right of review provided by the Administrative Procedure Act, 5 U.S.C. § 702, the district courts have jurisdiction to hear only suits “seeking relief other than money damages.” See Grant Appeals Board, at 781-783; Wingate v. Harris, 501 F.Supp. 58, 62 (S.D.N.Y.1980).
The disallowance decision at issue in this case, unlike that at issue in Grant Appeals Board however, represents an ongoing policy that has significant prospective effect. The structure of the Medicaid program (in which the Secretary “reimburses” the states in advance) makes it inevitable that disallowance decisions concern money past due. Yet the Secretary uses these decisions to implement important policies governing ongoing programs. Grant Appeals Board concerned the unusual situation in which the disallowance decision had no significant prospective effect; the challenge only concerned the money allegedly past due.
Here, in contrast, the interpretation of the Medicaid Act announced in the disallowance decision affects far more than any money past due. The special education exclusion defines the respective roles of the Commonwealth and HHS in a continuing program. The Commonwealth’s complaint challenging this statutory interpretation makes this prospective effect clear. Under the heading “Requests For Relief,” the Commonwealth requested that the court do the following:
1. Enjoin the Secretary and the Administrator from failing or refusing to reimburse the Commonwealth or from recovering from the Commonwealth the federal share of expenditures for medical assistance to eligible residents of intermediate care facilities for the mentally retarded.
2. Set aside the Board’s Decision No. 438.
3. Grant such declaratory and other relief as the Court deems just.
GAB Decision No. 438 consists of not only a refusal to pay money, but also a statement of law governing the ongoing relationship between the Commonwealth and HHS. The requested injunction is not specific to the retrospective, 1978-1982 reimbursement disallowed by the Secretary. Rather, it stretches into the future, as does the legal relationship between the parties. Prospective relief is important to the Commonwealth both because the ICF/MR program is still active and because the legal issues involved have ramifications that affect other aspects of the Medicaid program. What is at stake here is the scope of the Medicaid program, not just how many dollars Massachusetts should have received in any particular year.
A comparison of this decision with that in Grant Appeals Board reveals some of the contours of the § 702 money damages exclusion. Where a grant-in-aid dispute concerns only money past due, and no statute specifically authorizes a suit in district court, the Tucker Act provides the only applicable waiver of sovereign immu*800nity; the case must go to the Claims Court. See Grant Appeals Board, at 785. But, where a grant-in-aid dispute concerns a legal question that has a significant, prospective effect on the ongoing relationship between the federal agency and the affected state, the Administrative Procedure Act grants the district court jurisdiction to provide injunctive and declaratory relief. The district court may not, however, consider the claim for money past due. That claim is one for “money damages” governed by our decision in Grant Appeals Board, supra. While this prospective/retrospective distinction “admittedly elevates from over function,” Kozera v. Spirito, 723 F.2d 1003, 1008 (1st Cir.1983), it nonetheless is required by the Administrative Procedure Act’s exclusion of suits seeking money damages. See State of Minnesota by Noot v. Heckler, 718 F.2d 852, 858 (8th Cir.1983).1
Accordingly, the district court below had jurisdiction to review the disallowance decision of the Grant Appeals Board and to grant declaratory and injunctive relief. The district court could not, however, order the Secretary to pay the money. On remand the district court should send the case back to the Secretary for action consistent with the Medicaid Act as interpreted in this decision. Should the Secretary persist in withholding reimbursement for reasons inconsistent with our decision, the Commonwealth’s remedy would be a suit for money past due under the Tucker Act in the Claims Court. In that subsequent suit we assume that the Secretary would be collaterally estopped from raising issues decided here. See Wright, Law of Federal Courts 682 (1983) (“if an issue of fact or law was actually litigated and determined by a valid and final judgment, the determination is conclusive in a subsequent claim between the parties, whether on the same or a different claim”).
III. The Merits
Deciding the merits of this case requires a close analysis of the Medicaid statute, Title XIX of the Social Security Act, 42 U.S.C. § 1396 et seq., and an examination of the basis of the Secretary's decision.
Because we are limited to granting declaratory and prospective relief, we will only consider the merits of the special education exclusion and not whether the Secretary should have reimbursed for the specific services at issue in this case.2 The Secretary argues that the special education exclusion follows from a reasonable interpretation of his own regulation, which is itself a reasonable interpretation of the Medicaid Act, and should therefore be affirmed. We acknowledge that the Secretary’s interpretation of his own regulation is entitled to great deference. See United States v. Larionoff, 431 U.S. 864, 872-73, 97 S.Ct. 2150, 2155-56, 53 L.Ed.2d 48 (1977). Nevertheless, the Secretary may not interpret his regulation in contravention of the enabling statute, which is what the District Court found took place in this *801case. Consequently, our decision will focus on statutory, rather than regulatory, interpretation. And while the Secretary’s interpretation of his enabling statute is entitled to some weight in our analysis, see Miller v. Youakim, 440 U.S. 125, 144-45 n. 25, 99 S.Ct. 957, 968-69 n. 25, 59 L.Ed.2d 194 (1979), it is not entitled to the same deference as an interpretation of his own regulation. Furthermore, in a dispute between the Secretary and a state over the meaning of the Medicaid statute, our usual deference must give way somewhat to the cooperative federalism goals of the Medicaid program.
Our review stems from § 706(2)(C) of the Administrative Procedure Act which authorizes courts to set aside agency action “in excess of statutory jurisdiction, authority, or limitations, or short of statutory right.” 5 U.S.C. § 706(2)(C). In such a review we accept the facts as stated by the Secretary, as long as they are supported by substantial evidence, and decide all questions of law de novo. In this case the facts are not in dispute.
A. The Statutory Framework
The Medicaid Act comprises Title XIX of the Social Security Act, 42 U.S.C. § 1396 et seq. The Social Security Act in general, and the Medicaid title of that Act in particular, is one of the most complex statutes Congress has ever enacted. See Schweiker v. Gray Panthers, 453 U.S. 34, 43, 101 S.Ct. 2633, 2640, 69 L.Ed.2d 460 (1981). Over time the Act has grown by accretion, rather than careful planning. Be that as it may, we have to make sense out of the accretions and their accompanying contradictions and silences. To that effect we are to be guided by, but not bound to, the Secretary’s experience and expertise in working with the statute. We must also be responsive to “the general principle that the Social Security Act should be broadly construed, so as to carry out Congress’ intent to provide medical expense coverage for all qualifying individuals.” Mayburg v. Secretary of Health and Human Services, 740 F.2d 100, 103 (1st Cir.1984).
The first section of Title XIX states the broad purposes of the Medicaid Act as follows:
For the purpose of enabling each State, as far as practicable under the conditions in such State, to furnish (1) medical assistance on behalf of families with dependent children and of aged, blind, or disabled individuals, whose income and resources are insufficient to meet the costs of necessary medical services, and (2) rehabilitation and other services to help such families and individuals attain or retain capability for independence or self-care, there is hereby authorized to be appropriated for each fiscal year a sum sufficient to carry out the purposes of this subchapter.
42 U.S.C. § 1396. The appropriation for achieving these purposes is automatic, as is the Secretary’s corresponding payment to the states for costs incurred in pursuit of these goals and in compliance with the statute. The Medicaid Act provides that “[f]rom the sums appropriated therefor, the Secretary ... shall pay to each State ... an amount equal to the Federal medical assistance percentage ... of the total amount expended ... as medical assistance.” 42 U.S.C. § 1396b. If something is “medical assistance” the Secretary must pay a percentage of its costs. Thus, the determination of whether a service is medical assistance is central to the reimbursement decision.
The Act defines “medical assistance” to mean, among other things, “payment of part or all of the cost of ... intermediate care facility services.” 42 U.S.C. § 1396d(b). Accordingly, if something is an “intermediate care facility service” the Secretary must reimburse. “Intermediate care facility services” are themselves defined as follows in relevant part:
The term “intermediate care facility services” may include services in a public institution (or distinct part thereof) for the mentally retarded or persons with related conditions if—
(1) the primary purpose of such institution (or distinct part thereof) is to provide health or rehabilitative services for mentally retarded individuals and which *802meet such standards as may be prescribed by the Secretary____
42 U.S.C. § 1396d(d). While this last definition is far from complete, it does make clear that, like “medical assistance” generally, intermediate care facility services include both “health” and “rehabilitative” services. And, under § 1396 “rehabilitation” includes “services to help ... families and individuals attain or retain capability for independence or self-care.” Massachusetts claims that the disputed services provided by DOE to residents of the ICF/MR’s are for such rehabilitation.
B. The Secretary’s Interpretation: The Medical/Educational Dichotomy
The Secretary disallowed the services because they were provided by Department of Education personnel and contractors pursuant to the state special education law, Mass.St.1972 ch. 766. Under the Secretary’s regulations, “intermediate care facility services” are limited to health and rehabilitation activities and not “vocational training and educational activities.” See 42 C. F.R. § 441.13(b). The Secretary interprets this educational prohibition to extend to “special education.” See, e.g., Oklahoma Department of Human Services, Grant Appeals Board Decision No. 367 (Dec. 17, 1982). According to Department policy, “special education” includes all services provided as special education under a state special education statute, whether or not such services would be considered reimbursable “medical assistance” if not covered by the state statute. In other words, the Secretary defines “intermediate care facility services” and “educational activities” to be mutually exclusive categories whose boundaries are determined, in important part, by state special education law.
The Secretary offers three primary arguments in favor of his interpretation of “intermediate care facilities.” First, Congress did not intend to reimburse states for any “special education” services, because those services are provided under state special education programs that qualify the states to receive Federal money under the Education for All Handicapped Children Act, 20 U.S.C. § 1401 et seq. Second, under the Medicaid statute, 42 U.S.C. § 1396a(a)(25), HHS is a payor of last resort that may not reimburse when any state agency has a statutory obligation to pay for services. And third, under 42 U.S.C. § 1302 the Secretary has discretion to interpret incompletely defined terms in the Medicaid statute; the interpretation in question is a reasonable one that is consistent and longstanding and, as such, is entitled to great deference. We will treat each of these arguments in turn.
1. The Education for All Handicapped Children Act
The Education for All Handicapped Children Act (EHCA), 20 U.S.C. § 1401 et seq., set up a federal funding mechanism for state-provided special education and related services. The Secretary claims that by setting up this mechanism in 1975, Congress meant to preclude any funding for special education services under the 1971 intermediate care facility services amendment to the Medicaid Act. The Secretary argues, essentially, that because Congress specifically funded special education services under the EHCA, it did not intend to fund any special education services under the more general terms of the pre-existing Medicaid statute.
The EHCA provides grants for some special education costs to states that set up an acceptable special education program. See 20 U.S.C. § 1412. The special education services at issue in this case include some services which Massachusetts is required to provide as “special education” in order to receive EHCA grants and some services which go beyond the EHCA minimum. See 34 C.F.R. §§ 300.13, 300.14; Massachusetts Department of Public Welfare, Grant Appeals Board Decision No. 438, slip op. at 14-15 (May 31, 1983). None of the service costs at issue have been paid for by EHCA or other federal funds.
The Secretary’s argument applies only to the EHCA minimum services. If applied to services above the EHCA minimum it would directly contravene the intent of the EHCA: providing free special education and related services to all handicapped chil*803dren. Removing from Medicaid coverage any service which a state voluntarily provided to all children free of charge, without any resulting federal benefit, would discourage states from providing such a service and penalize EHCA beneficiaries who are not eligible for Medicaid.
With regard to the EHCA minimum services, the chief problem with the Secretary’s argument is the timing of the enactment of the two statutes. The EHCA was enacted four years after the intermediate care facility services amendment. The EHCA manifests no intent to cut back on the scope of reimbursable intermediate care facility services. In fact, the legislative history of the EHCA states:
Any funds available from the Federal government are clearly in addition to funds provided under this act and are available to states to assist them in carrying out their responsibilities under State laws, state constitutions, and the U.S. Constitution.
1975 U.S.Code, Cong. Admin.News 1425, 1447 (emphasis supplied). Accordingly, we find that the EHCA did not modify the Medicaid Act to prohibit funding of special education services.
2. Medicaid as Payor of Last Resort
The concept of payor of last resort in the Medicaid program comes from the Medicaid Act’s requirement that the state administering agency “ascertain the legal liabilities of third parties to pay for care and services (available under the [Medicaid] plan)” and refuse to provide that care or service, or, where the agency has already provided care, “seek reimbursement for such assistance to the extent of legal liability.” 42 U.S.C. § 1396a(a)(25). The Secretary argues that the Massachusetts Department of Education is a “third party” with an independent obligation under state law (ch. 766) to pay for the services in question here and that, therefore, DOE’s costs in providing the services cannot be borne by the Medicaid program.
This third party liability argument is a variation on the EHCA theme outlined in the previous section. Prior to the EHCA even the Secretary would admit that DOE had no third party liability. And because Congress clearly intended that the EHCA not divest states of existing funding sources, a state statute enacted to obtain EHCA funding should not be read to create a third party liability that divests a state of any Medicaid funding.
Independent of the EHCA theme and variation, the third party liability argument fails because the DOE chapter 766 program is not a “third party” to the Department of Public Welfare, the state agency that administers the Medicaid program in Massachusetts. Both agencies, along with the DMH, are subdivisions of the Commonwealth of Massachusetts, which brought them into being to serve complementary social welfare goals. That they even appear to be “third party” to one another is an artifact of the Commonwealth’s internal organization. Were Massachusetts to reorganize and create one “super agency” to take over the functions of all three departments, the Medicaid and special education programs would not change, yet the Secretary’s third party argument would disappear. This Medicaid reimbursement decision should not turn on how a state subdivides its social welfare functions and authority.
3. Agency Discretion to Interpret the Medicaid Statute
The Medicaid Act authorizes the Secretary to “make and publish such rules and regulations, not inconsistent with this chapter, as may be necessary to the efficient administration of” the Medicaid program. 42 U.S.C. § 1302. This provision gives the Secretary authority to make reasonable regulations such as the general educational exclusion regulation in 42 C.F.R. § 441.-13(b). As the Secretary argues, and we acknowledge, the education regulation is a reasonable interpretation of the Medicaid Act’s limitation of funding under § 1396 to “medical assistance” and “rehabilitation and other services to help ... individuals attain or retain capability for independence of self-care.”
*804The Secretary argues further that he is entitled to great deference in interpreting such a reasonable regulation and that, therefore, his special education exclusion should be upheld. As we stated earlier, the Secretary does have considerable latitude to interpret his own regulation without interference from the courts. But, that latitude does not extend to an interpretation that contravenes the statute that the regulation is supposed to implement. In this case, the blanket special education exclusion violates the Medicaid Act because it excludes from reimbursement services which the Medicaid Act requires the Secretary to reimburse.
This case illustrates a problem that can result from an interpretive regulation that requires an agency to make an inquiry that the enabling statute does not mention. Here, the education regulation requires the Secretary to determine whether a given service is educational; but the Medicaid Act refers only to medical assistance. Making an inquiry into whether a particular service is “educational” does seem to be a fair way to decide whether, on the whole, it is medical assistance. What most people think of as education (what the district court below referred to as “traditional academic education”) is not “medical assistance” under Medicaid. But the reasonableness of this inquiry depends on the meaning the Secretary gives to the word “education.” If the concept of “education” is expanded to include, for example, teaching a severely retarded child to control the rate at which he is fed so that he does not get food into his lungs (one of the “special education” services at issue in this case), then the exclusion goes beyond statutory authority. According to chapter 766, such a service is special education. But, as the District Court found upon review of specific evidence, this service is also a “health or rehabilitative service” covered by § 1396d(d). See Commonwealth of Mass. v. Heckler, 616 F.Supp. at 692-93. It is thus reimbursable “medical assistance.”
As the Secretary acknowledges, the concepts embodied in the terms “education” and “medical assistance” overlap. When they do, it is simply wrong to find that the concept “education,” which comes from the regulations, controls over the concept “medical assistance,” which is contained in the statute. Yet this error exactly describes the Secretary’s position, as a recent Grant Appeals Board decision in a similar case makes clear. See Pennsylvania Department of Public Welfare, Decision No. 777 (August 20, 1986). In that case, the Board stated baldly “the relevant question concerning the nature of the services is whether the services are educational, since [federal reimbursement] is prohibited in such services whether or not they are also within the scope of Title XIX.” Id. at p. 17 (emphasis supplied). The Secretary would have us turn the statute on its head, an invitation which we decline. The relevant question raised by the statute is whether the services are “medical assistance,” which, as we have now stated repeatedly, includes ICF/MR “services to help ... individuals attain or retain capability for independence or self care.” 42 U.S.C. § 1396. Accordingly, the Secretary may not determine whether a service is included in the Medicaid program by sole reference to a state’s special education law. The Secretary must make an inquiry into the nature of the services, not just into what they are called or who provides them.
III. Conclusion
In summary, we conclude that, while the district court lacked jurisdiction to order the Secretary to release the funds withheld because of the disallowance decision, the court properly determined that the special education exclusion exceeded statutory authority and vacated the decision of the Grant Appeals Board. Nevertheless, we cannot rule that the services in question here are reimbursable “medical assistance” because we have no evidentiary basis for doing so. All we can do is order the Secretary to develop a Medicaid audit procedure that looks behind the state statutory label “special education” to determine whether services are reimbursable.
Accordingly, so much of the district court’s decision that constitutes a declaratory judgment that the Secretary’s blanket *805special education exclusion is in excess of statutory authority is affirmed. The money judgment against the Secretary is vacated.
Affirmed in part, vacated in part and remanded for action consistent with this opinion. Each party to bear its own costs.
. This approach differs from the "prime objective" approach in one significant way. See New Mexico v. Regan, 745 F.2d 1318, 1322 (10th Cir.1984). The prime objective approach looks at the subjective intention of the party bringing the suit and asks "what was the primary purpose in bringing this suit?” If the answer is "to obtain money,” then the suit goes to the Claims Court. The approach in this case, on the other hand, looks at the effect of the judgment sought and not the intention of the complainant, other than as that intention bears on the retrospective or prospective effect of the relief sought. In many, and perhaps most, grant in aid cases the results of the two analyses will be the same. But the retrospective/prospective analysis should prove both easier to make and more consistent than an inquiry based on the intention of the state bringing the suit. Furthermore, sovereign immunity, which is what this § 702 problem is all about, concerns the willingness of the sovereign to subject itself to suit. That willingness turns on what the suit will require the sovereign to do, rather than why the suit was brought, and we read § 702 accordingly. Judge Breyer believes that these two tests come to the same thing and that both are satisfied here.
. We note that even if we could reach this issue we would have no evidentiary basis for deciding whether these particular services are "medical assistance” or not. The most we could do is remand. See Sarasota, Florida v. E.P.A., 799 F.2d 674, 680-81 (11th Cir.1986). For the same reason, our declaratory relief is limited to invalidating the special education exclusion and does not extend to a declaration that the Secretary must reimburse for these services henceforth.