
79 N.Y.2d 434 (1992)
19th Street Associates et al., Respondents,
v.
State of New York et al., Defendants, and Barbara Sommerfield et al., Appellants.
Court of Appeals of the State of New York.
Argued March 26, 1992.
Decided May 7, 1992.
Jack L. Lester for Barbara Sommerfield and others, appellants.
Arthur Silverman and another, appellants, pro se.
Jay R. Fialkoff, Charles G. Moerdler and Regan A. Shulman for respondents.
Judges KAYE, TITONE, HANCOCK, JR., BELLACOSA and YESAWICH, JR.,[*] concur; Judge SIMONS taking no part.
*440Chief Judge WACHTLER.
In this case, we consider the constitutionality of a statute that extends protection against eviction to the appellants, who are nonpurchasing tenants currently in occupancy of apartment units in the cooperative apartment building located at 205 Third Avenue in New York City. Respondents are the owners and holders of the unsold shares and related proprietary leases in 205 Third Avenue Owners Corporation.
The building in question underwent cooperative conversion in 1981. In 1982, the Attorney-General commenced an action against respondents alleging violations of the Martin Act (General Business Law art 23-A). The parties agreed to a settlement of this action, the terms of which settlement were contained in a consent judgment dated May 26, 1982. The consent judgment required respondents to rescind certain purchase agreements and to permit all nonpurchasing tenants to remain in their apartments through December 31, 1989. Further, the respondents were enjoined from transferring or conveying any interest in realty for the apartments of the nonpurchasing tenants until the nonpurchasing tenant ceased to occupy the apartment or until December 31, 1989, whichever came sooner. In return, the offering plan remained an eviction plan, provided that the nonpurchasing tenants were given all the rights of rent stabilized tenants.
Following the consent judgment, the Attorney-General filed two more suits arising out of the same set of facts. In State of New York v Rachmani Corp. (71 N.Y.2d 718), this Court held that the selling agent for the cooperative had not committed actionable fraud. In State of New York v 19th St. Assocs. (index No. 6000/86), Supreme Court granted the respondents' *441 motion to dismiss the Attorney-General's complaint, again premised on Martin Act violations, on the grounds of res judicata.
In 1989, the Legislature passed Senate Bill 630 (Assembly Bill 1071), which was entitled "An Act to provide continued tenancy for certain non-purchasing tenants in the city of New York" (L 1989, ch 473). This measure granted protection from eviction to "non-purchasing tenants currently residing in multiple dwellings subject to a cooperative or condominium conversion eviction plan * * * who remain in occupancy of unsold units by virtue of a judgment entered in the supreme court prior to December thirty-first, nineteen hundred eighty-two." (L 1989, ch 473, § 1.) In his memorandum to the Governor, the Attorney-General conceded that "[t]his bill would principally benefit a small number of non-purchasing tenants who reside in an apartment building located at 205 Third Avenue in New York City * * * who remain in occupancy of unsold units by virtue of a judgment in an action brought by my office which was entered in State Supreme Court prior to December 31, 1982."
By summons and complaint dated October 9, 1989, the respondents commenced this action for a declaratory judgment that the Act was an unconstitutional attempt to nullify the terms of the 1982 consent judgment. Supreme Court treated the Attorney-General's subsequent motion to dismiss as a motion for summary judgment and granted summary judgment in the respondents' favor. Specifically, the court found that the statute (1) deprived the respondents of due process in violation of article I, § 6 of the New York Constitution and the 5th and 14th Amendments of the United States Constitution; (2) violated respondents' rights to equal protection of the laws as guaranteed by article I, § 11 of the New York Constitution and the 14th Amendment of the United States Constitution; (3) was a private or local law that granted the appellants "an exclusive privilege, immunity or franchise" in violation of article III, § 17 of the New York Constitution; (4) violated the Home Rule Amendment (art IX, § 2 [b]) of the New York Constitution; (5) constituted a taking of respondents' property for a public use without just compensation, in violation of article I, § 7 of the New York Constitution and the 5th and 14th Amendments of the United States Constitution; (6) violated article I, § 10, clause (1) of the United States Constitution prohibiting laws impairing the obligations of contracts and bills of attainder; and (7) violated the principle *442 of separation of powers contained in the New York Constitution. The nonpurchasing tenants appealed to the Appellate Division. The Attorney-General took no appeal.
The Appellate Division affirmed, concluding that the law deprived the respondents of due process and equal protection of the laws, granted the nonpurchasing tenants an exclusive privilege, functioned as an improper taking and impaired the respondents' contractual rights. We agree with the Appellate Division that the respondents' contractual rights have been unconstitutionally impaired and affirm on that ground. As a result, it is not necessary to reach the appellants' other constitutional arguments.
Both lower courts found, and both sides apparently agree, that the consent judgment constitutes a contract. We too conclude that the consent judgment, which represents a settlement of the claims against the respondents, is in the nature of a contractual obligation since it contains a number of promises that are supported by valid consideration, and is legally enforceable according to its terms (see generally, Farnsworth, Contracts § 1.1; see also, Home Bldg. & Loan Assn. v Blaisdell, 290 US 398, 429; Cook v City of Binghamton, 48 N.Y.2d 323, 329-330).
Having decided as a preliminary matter that the consent judgment is in the nature of a contract, we must next decide whether the statute at issue has unconstitutionally impaired this contract in violation of article I, § 10 of the United States Constitution, which states that "[n]o state shall * * * pass any * * * law impairing the obligation of contracts." The Supreme Court has repeatedly held that this language should not be read literally and that the States retain the power "to safeguard the vital interests of [their] people" (Home Bldg. & Loan Assn. v Blaisdell, supra, at 434; see also, Keystone Bituminous Coal Assn. v DeBenedictis, 480 US 470, 502; Energy Reserves Group v Kansas Power & Light, 459 US 400, 410; Worthen Co. v Thomas, 292 US 426, 433).
"The threshold inquiry is `whether the state law has, in fact, operated as a substantial impairment of a contractual relationship'" (Energy Reserves Group v Kansas Power & Light, supra, at 411, quoting Allied Structural Steel Co. v Spannaus, 438 US 234, 244). In agreeing to the terms of the consent judgment, the respondents expected that after December 31, 1989, they would be permitted to evict the remaining nonpurchasing tenants and sell the shares allocated to their *443 apartments. This expectancy has been substantially, if not completely destroyed by the 1989 statute. Thus, we conclude that the State law has certainly impaired a preexisting contractual relationship.
But the inquiry does not end there. Even if a contract has in fact been impaired, the State may avoid a finding of unconstitutional impairment by demonstrating the existence of "a significant and legitimate public purpose * * * such as the remedying of a broad and general social or economic problem" (Energy Reserves Group v Kansas Power & Light, supra, at 411-412; see also, Crane Neck Assn. v New York City/Long Is. County Servs. Group, 61 N.Y.2d 154, 167). "The requirement of a legitimate public purpose guarantees that the State is exercising its police power, rather than providing a benefit to special interests" (Energy Reserves Group v Kansas Power & Light, supra, at 412). Once a legitimate public purpose is identified, the inquiry shifts to whether the legislation at issue is based "`upon reasonable conditions and [is] of a character appropriate to the public purpose justifying [the legislation's] adoption'" (id., at 412, quoting United States Trust Co. v New Jersey, 431 US 1, 22). In other words, "an impairment may be constitutional if it is reasonable and necessary to serve an important public purpose" (United States Trust Co. v New Jersey, supra, at 25; see also, Matter of Subway-Surface Supervisors Assn. v New York City Tr. Auth., 44 N.Y.2d 101, 109-110; Patterson v Carey, 41 N.Y.2d 714, 722-723). Although courts ordinarily defer to legislative assessment of the reasonableness or necessity of a particular measure, where the State is a party to the underlying contract, "complete deference * * * is not appropriate because the State's self-interest is at stake" (United States Trust Co. v New Jersey, supra, at 26; see also, Patterson v Carey, supra, at 722).
Applying these principles to the case now before us, we conclude that although the State has identified a legitimate and important public purpose, the statute was neither reasonable nor necessary to serve that purpose.
The statute was premised on a finding that "due to the housing emergency in the city of New York, a greater degree of care must be taken in preserving the homes of certain tenants threatened with eviction." (L 1989, ch 473, § 1.) The sentiment that the State should act to alleviate New York City's housing crisis and to protect tenants from its effects is certainly unobjectionable. This is an important public purpose.
*444We conclude, however, that the legislation at issue here was not of a character appropriate to this important public purpose. This statute does not alleviate the housing crisis or afford any meaningful protection to the public or to New York City tenants at large. By its terms, it greatly circumscribes the class of tenants that is benefited; indeed, the respondents contend that only the nonpurchasing tenants in this particular building fall within the statute's reach. This argument is borne out by the Attorney-General's memorandum to the Governor, which states that "[t]his bill would protect those few tenants in the aforementioned building [205 Third Avenue] who  as a result of a court order in an action brought by the Attorney General against the sponsor of the conversion plan  have not yet been evicted." As noted above, after execution of the consent judgment but before enactment of this law, the Attorney-General brought two additional actions to vindicate the rights of these tenants. This statute was passed a little more than two years after the second action was dismissed on the grounds of res judicata.
In the guise of protecting New York City tenants from the effects of a housing emergency, this statute is in reality drawn so restrictively as to benefit only a handful. Although the Legislature invoked the New York City housing crisis as justification for enacting the statute, there is only the most tenuous connection between that crisis and the not insubstantial protections afforded the nonpurchasing tenants in this case. In short, this statute has all the indicia of special interests legislation. As a result, we cannot conclude that the statute is either necessary or reasonable to serve the purpose identified in the statute. It is, therefore, an unconstitutional impairment of the contract between the respondents and the State of New York and must fall.
We have considered appellants' remaining nonconstitutional arguments and we find them to be without merit. Accordingly, the order of the Appellate Division should be affirmed, with costs.
Order affirmed, with costs.
NOTES
[*]  Designated pursuant to NY Constitution, article VI, § 2.
