Mr. Justice Stewart
delivered the opinion of the Court.
This suit was brought as a class action under 42 U. S. C. i 1983 in the District Court for the Northern District of Illinois to enjoin the enforcement of an Illinois statute that prohibits state medical assistance payments for all abortions except those “necessary for the preservation of the life of the woman seeking such treatment.” The plaintiffs were two physicians who perform medically necessary abortions for indigent women, a welfare rights organization, and Jane Doe, an indigent pregnant woman who alleged that she desired an abortion that was medically necessary, but not necessary to save her life. The defendant was the Director of the Illinois Department of Public Aid, the agency charged with administering the State’s medical assistance programs. Two other physicians intervened as defendants.
The plaintiffs challenged the Illinois statute on both federal statutory and constitutional grounds. They asserted, first, that Title XIX of the Social Security Act, commonly known as the “Medicaid” Act, 42 U. S. C. § 1396 et seq. (1976 ed. and Supp. II), requires Illinois to provide coverage in its Medicaid plan for all medically necessary abortions, whether or not the life of the pregnant woman is endangered. Second, the plaintiffs argued that the public funding by the State of medically necessary services generally, but not of certain medically necessary abortions, violates the Equal Protection Clause of the Fourteenth Amendment.
The District Court initially held that it would abstain from considering the complaint until the state courts had construed the challenged statute. The plaintiffs appealed, and the Court of Appeals for the Seventh Circuit reversed. Zbaraz v. Quern, 572 F. 2d 582. The appellate court held that abstention was inappropriate under the circumstances, and remanded the case for further proceedings, including consideration of the plaintiffs’ motion for a preliminary injunction. On remand, the District Court certified two plaintiff classes: (1) a class of all pregnant women eligible for the Illinois medical assistance programs who desire medically necessary, but not life-preserving, abortions, and (2) a class of all Illinois physicians who perform medically necessary abortions for indigent women and who are certified to obtain reimbursement under the Illinois medical assistance programs.
Addressing the merits of the complaint, the District Court concluded that Title XIX and the regulations promulgated thereunder require a participating State under the Medicaid program to provide funding for all medically necessary abortions. According to the District Court, the so-called “Hyde Amendment” — under which Congress has prohibited the use of federal funds to reimburse the costs of certain medically necessary abortions — does not relieve a State of its independent obligation under Title XIX to provide Medicaid funding for all medically necessary abortions. Thus, the District Court permanently enjoined the enforcement of the Illinois statute insofar as it denied payments for abortions that are “medically necessary or medically indicated according to the professional medical judgment of a licensed physician in Illinois, exercised in light of all factors affecting a woman’s health.”
The Court of Appeals again reversed. Zbaraz v. Quern, 596 F. 2d 196. Reaching the same conclusion as had the Court of Appeals for the First Circuit in Preterm, Inc., v. Dukakis, 591 F. 2d 121, the court held that the Hyde Amendment “alters Title XIX in such a way as to allow states to limit funding to the categories of abortions specified in that amendment.” 596 F. 2d, at 199. It further held, however, that a participating State may not, consistent with Title XIX, withhold funding for those medically necessary abortions for which federal reimbursement is available under the Hyde Amendment. Accordingly, the case was remanded to the District Court with instructions that the permanent injunction be modified so as to require continued state funding only “for those abortions fundable under the Hyde Amendment.” Id., at 202. The Court of Appeals also directed the District Court to proceed expeditiously to resolve the constitutional questions it had not reached. The District Court was specifically directed to consider “whether the Hyde Amendment, by limiting funding for abortions to certain circumstances even if such abortions are medically necessary, violates the Fifth Amendment.” Ibid, (footnote omitted).
On the second remand, the District Court notified the Attorney General of the United States that the constitutionality of an Act of Congress had been drawn into question, and the United States intervened, pursuant to 28 U. S. C. § 2403 (a), to defend the constitutionality of the Hyde Amendment. Zbaraz v Quern, 469 F. Supp. 1212, 1215, n. 3. In view of the fact that the plaintiffs had not challenged the Hyde Amendment, but rather only the Illinois statute, the District Court expressed misgivings about the propriety of passing on the constitutionality of the federal law. . But noting that the same reasoning would apply in determining the constitutional validity of both the Illinois statute and the Hyde Amendment, the District Court observed: “Although we are not persuaded that the federal and state enactments are inseparable and would hesitate to inject into the proceeding the issue of the constitutionality of a law not directly under attack by plaintiffs, we are obviously constrained to obey the Seventh Circuit’s mandate. Therefore, while our discussion of the constitutional questions will address only the Illinois statute, the same analysis applies to the Hyde Amendment and the relief granted will encompass both laws.” Ibid.
The District Court then concluded that both the Illinois-statute and the Hyde Amendment are unconstitutional insofar as they deny funding for “medically necessary abortions prior to the point of fetal viability.” Id., at 1221. If the public funding of abortions were restricted to those covered by the Hyde Amendment, the District Court thought that the effect would “be to increase substantially maternal morbidity and mortality among indigent pregnant women.” Id., at 1220. The District Court held that the state and federal funding restrictions violate the constitutional standard of equal protection because
“a pregnant woman’s interest in her health so outweighs any possible state interest in the life of a non-viable fetus that, for a woman medically in need of an abortion, the state’s interest is not legitimate. At the point of viability, however, 'the relative weights of the respective interests involved’ shift, thereby legitimizing the state’s interests. After that point, therefore, ... a state may withhold funding for medically necessary abortions that are not life-preserving, even though it funds all other . medically necessary operations.” Id., at 1221.
Accordingly, the District Court enjoined the Director of the Illinois Department of Public Aid from enforcing the Illinois statute to deny payment under the state medical assistance programs for medically necessary abortions prior to fetal viability. The District Court did not, however, enjoin any action by the United States.
The intervening-defendant physicians, the Director of the Illinois Department of Public Aid, and the United States each appealed directly to this Court, averring jurisdiction under 28 U. S. C. § 1252. This Court consolidated the appeals and postponed further consideration of the question of jurisdiction until the hearing on the merits. 444 U. S. 962.
I
The asserted basis for this Court’s jurisdiction over these appeals is 28 U. S. C. § 1252, which provides in relevant part:
“Any party may appeal to the Supreme Court from an interlocutory or final judgment, decree or order of any court of the United States . . . holding an Act of Congress unconstitutional in any civil action, suit, or proceeding to which the United States or any of its agencies, or any officer or employee thereof, as such officer or employee, is a party.”
It is quite obvious that the literal requirements of § 1252 are satisfied in the present cases, for these appeals were taken from the final judgment of a federal court declaring unconstitutional an Act of Congress — the Hyde Amendment — in a civil action to which the United States was a party by reason of its intervention pursuant to 28 U. S. C. § 2403 (a).
It is equally clear, however, that the appellees and the United States are correct in asserting that the District Court in fact lacked jurisdiction to consider the constitutionality of the Hyde Amendment, for the court acted in the absence of a case or controversy sufficient to permit an exercise of judicial power under Art. Ill of the Constitution. None of the parties to these eases ever challenged the validity of the Hyde Amendment, and the appellees could have been awarded all the relief they sought entirely on the basis of the District Court’s ruling with regard to the Illinois statute. The constitutional validity of the Hyde Amendment was interjected as an issue in these cases only by the erroneous mandate of the Court of Appeals. But, even though the District Court was simply following that mandate, the directive of the Court of Appeals could not create a case or controversy where none otherwise existed. It is clear, therefore, that the District Court exceeded its jurisdiction under Art. Ill in declaring the Hyde Amendment unconstitutional.
The question thus arises whether the District Court’s lack of jurisdiction in declaring the Hyde Amendment unconstitutional divests this Court of jurisdiction over these appeals. We think not. As the Court in McLucas v. DeChamplain, 421 U. S. 21, 31-32, observed:
“Our previous cases have recognized that this Court’s jurisdiction under § 1252 in no way depends on whether the district court had jurisdiction. On the contrary, an appeal under § 1252 brings before us, not only the constitutional question, but the whole ease, including threshold issues of subject-matter jurisdiction, and whether a three-judge court was required.” (Citations omitted.)
Thus, in the McLucas case, which involved an appeal under § 1252 from a single-judge District Court, this Court preter-mitted the question whether the single-judge District Court had had jurisdiction to enter the challenged preliminary injunction, and instead resolved the appeal on the merits. It follows from McLucas that, notwithstanding the fact that the District Court was without jurisdiction to declare the Hyde Amendment unconstitutional, this Court has jurisdiction over these appeals and thus may review the “whole case.”
II
Disposition of the merits of these appeals does not require extended discussion. Insofar as we have already concluded that the District Court lacked jurisdiction to declare the Hyde Amendment unconstitutional, that portion of its judgment must be vacated. See, e. g., United States v. Johnson, 319 U. S. 302; Muskrat v. United States, 219 U. S. 346. The remaining questions concern the Illinois statute. The ap-pellees argue that (1) Title XIX requires Illinois to provide coverage in its state Medicaid plan for all medically necessary abortions, whether or not the life of the pregnant woman is endangered, and (2) the funding by Illinois of medically necessary services generally, but not of certain medically necessary abortions, violates the Equal Protection Clause of the Fourteenth Amendment. Both arguments are foreclosed by our decision today in Harris v. McRae, ante, p. 279. As to the appellees’ statutory argument, we have concluded in McRae that a participating State is not obligated under Title XIX to pay for those medically necessary abortions for which federal reimbursement is unavailable under the Hyde Amendment. As to their constitutional argument, we have concluded in McRae that the Hyde Amendment does not violate the equal protection component of the Fifth Amendment by withholding public funding for certain medically necessary abortions, while providing funding for other medically necessary health services. It follows, for the same reasons, that the comparable funding restrictions in the Illinois statute do not violate the Equal Protection Clause of the Fourteenth Amendment.
Accordingly, the judgment of the District Court is vacated, and the cases are remanded to that court for further proceedings consistent with this opinion.
It is so ordered.
[For dissenting opinion of Mr. Justice Brennan, see ante, p. 329.]
[For dissenting opinion of Mr. Justice Marshall, see ante, p. 337.]
[For dissenting opinion' of Mr. Justice Blackmun, see ante, p. 348.]
[For dissenting opinion of Mr. Justice Stevens, see ante, p. 349.]
The statute is codified as Ill. Rev. Stat., ch. 23 (1979). It provides in relevant part:
“§ 5-5. [Medical services.] The Illinois Department, by rule, shall determine the quantity and quality of the medical assistance for which payment will be authorized, and the medical services to be provided, which may include all or part of the following: [listing 16 categories of medical services], but not including abortions, or induced miscarriages or premature births, unless, in the opinion of a physician, such procedures are necessary for the preservation of the life of the woman seeking such treatment. . .
"§ 6-1. Eligibility requirements. . . . Nothing in this Article shall be construed to permit the granting of financial aid where the purpose of such aid is to obtain an abortion, induced miscarriage or induced premature birth unless, in the opinion of a physician, such procedures are necessary for the preservation of the life of the woman seeking such treatment. ...”
“§ 7-1. Eligibility requirements. Aid in meeting the costs of necessary medical, dental, hospital, boarding or nursing care, or burial shall be given under this Article [to eligible persons], except where such aid is for the purpose of obtaining an abortion, induced miscarriage nr induced premature birth unless, in the opinion of a physician, such procedures are necessary for the preservation of the life of the woman seeking such treatment. . .
The medical assistance programs at issue here are the Illinois Medicaid plan, which is jointly funded by the Federal Government and the State of Illinois, and two fully state-funded programs, the Illinois General Assistance and Local Aid to Medically Indigent Programs.
All opinions of the District Court other than that now under review are unreported.
Since September 1976, Congress has prohibited — by means of the “Hyde Amendment” to the annual appropriations for the Department of Health, Education, and Welfare (now divided into the Department of Health and Human Services and the Department of Education) — the use of any federal funds to reimburse the cost of abortions under the Medicaid program except under certain specified circumstances. The current version of the Hyde Amendment, applicable for fiscal year 1980, provides:
“[N]one of the funds provided by this joint resolution shall be used to perform abortions except where the life of the mother would be endangered if the fetus were carried to term; or except for such medical procedures necessary for the victims of rape or incest when such rape or incest has been reported promptly to a law enforcement agency or public health service.” Pub. L. 96-123, § 109, 93 Stat. 926.
See also Pub. L. 96-86, § 118, 93 Stat. 662. This version of the Hyde Amendment is broader than that applicable for fiscal year 1977, which did not include the “rape or incest” exception, Pub. L. 94-439, § 209, 90 Stat. 1434, but narrower than that applicable for most of fiscal year 1978 and all of fiscal year 1979, which had an additional exception for “instances where severe and long-lasting physical health damage to the mother would result if the pregnancy were carried to term when so determined by two physicians,’' Pub. L. 95-205, §101, 91 Stat. 1460; Pub. L. 95-480, § 210, 92 Stat. 1586. In this opinion, the term “Hyde Amendment” is used generically to refer to all three versions, except where indicated otherwise.
Neither the Director of the Illinois Department of Public Aid nor the intervening-physicians sought review of the judgment of the Court of Appeals. The District Court in the proceedings now on appeal proceeded on the premise that Title XIX obligates Illinois to fund all abortions reimbursable under the Hyde Amendment. That issue, therefore, is not before us on these appeals.
Although the medical assistance programs funded exclusively by the State are not governed directly by either Title XIX or the Hyde Amendment, the Court of Appeals concluded that the modified injunction requiring state payments for abortions fundable under the Hyde Amendment should apply to all three Illinois medical assistance programs, see n. 2, supra. 596 F. 2d, at 202-203. Relying on a statement in the State’s brief, the Court of Appeals held that the challenged Illinois statute was intended to represent the State’s understanding of the congressional purpose reflected in the original Hyde Amendment. Id., at 203. The Court of Appeals thus declined to sever the various funding restrictions in the Illinois statute.
Section 2403 (a) provides:
“In any action, suit or proceeding in a court of the United States to which the United States or any agency, officer or employee thereof is not a party, wherein the constitutionality of any Act of Congress affecting the public interest is drawn in question, the court shall certify such fact to the Attorney General, and shall permit the United States to intervene for presentation of evidence, if evidence is otherwise admissible in the case, and for argument on the question of constitutionality. The United States shall, subject to the applicable provisions of law, have all the rights of a party and be subject to all liabilities of a party as to court costs to the extent necessary for a proper presentation of the facts and law relating to the question of constitutionality.”
The District Court refused to stay its order, and the Director of the Illinois Department of Public Aid and the intervening-defendant physicians moved in this Court for a stay pending appeal. That motion was denied. 442 L’. S. 1309 (Stevens, J., in chambers). A reapplication by the intervening-defendant physicians also was denied. 442 U. S. 915.
Title XIX does not prohibit “[a] participating State . . . [from] including] in its Medicaid plan those medically necessary abortions for which federal reimbursement is unavailable [under the Hyde Amendment].” Harris v. McRae, ante, at 311, n. 16.
Although this Court need not pass on the remainder of the judgment in a case in which an appeal under § 1252 is taken from a court that lacked jurisdiction to declare a federal statute unconstitutional, see FHA v. The Darlington, Inc., 352 U. S. 977, we are empowered to do so because “an appeal under § 1252 brings before us, not only the constitutional question, but the whole case.” McLucas v. DeChamplain, 421 U. S., at 31. Here, there is no reason not to resolve the “whole case” on the merits. The remainder of the case that is properly before this Court, and which clearly involves a justiciable controversy, includes both the appellees’ federal statutory and constitutional challenges to the Illinois statute.
This case was decided by the District Court under the version of the Hyde Amendment applicable during fiscal year 1979, and Congress has since narrowed the ambit of the Hyde Amendment for fiscal year 1980, see n. 4, supra. The recent statutory revision does not, however, affect the outcome of either issue now before the Court. The statutory issue is not affected, because we today conclude in Harris v. McRae, ante, at 306-311, that Title XIX does not require a participating State to fund those medically necessary abortions for which federal reimbursement is unavailable under the Hyde Amendment, including the version of the Hyde Amendment applicable for fiscal year 1980. The constitutional issue is not affected, because, regardless of whether the State of Illinois is obligated to fund all abortions for which federal reimbursement is available under the Hyde Amendment, we conclude in Harris v. McRae that even the most restrictive version of the Hyde Amendment — which is similar to the Illinois statute at issue here — does not violate the equal protection standard of the Constitution. Since the outcome of these issues is not affected by the recent changes in the Hyde Amendment, we need not defer review in order to provide the District Court with an opportunity to evaluate the effects of these changes in the federal law.