OPINION OF THE COURT
Mercure, J.P.On this appeal, we are called upon to decide whether chapter 71 of the Laws of 2002 (hereinafter chapter 71), which as applied here precludes the foreclosure of two mortgages given by a matrimonial litigant to her attorney over a decade prior to the statute’s enactment, violates the US Constitution. Because we conclude that chapter 71 violates US Constitution, article I, §10 (hereinafter the Contract Clause), we reverse Supreme Court’s determination that the statute bars foreclosure here.
This foreclosure action was the subject of a prior appeal before this Court in which we affirmed an order directing foreclosure of two mortgages executed by defendant Jean O’Sullivan (hereinafter defendant) in favor of attorney Stewart T. Schantz, plaintiff’s predecessor in interest (288 AD2d 536, 537-538 [2001]). The mortgages were given in 1988 and 1991 to secure payment for a debt in connection with legal services provided by Schantz in a divorce action, which settled in August 1994. Defendant argued, among other things, that this action is barred by a court rule prohibiting foreclosure of a mortgage taken on a client’s primary residence by an attorney in a domestic relations matter (see 22 NYCRR 1400.5 [b]; see also Code of Professional Responsibility DR 2-106 [c] [2] [iii] [22 NYCRR 1200.11 (c) (2) (iii)]). We concluded that while Schantz’s actions would now violate 22 NYCRR 1400.5 (b), the rule did not apply because Schantz commenced representation of defendant prior to the rule’s effective date, November 30, 1993 (288 AD2d 536, 538 n [2001], supra-, see 22 NYCRR 1400.1; see also Goldman v Gold*24man, 95 NY2d 120, 122-123 [2000]).1 An amended judgment of foreclosure and sale was entered in May 2002, and the sale of defendant’s house was scheduled for August 2002.
Prior to the sale and in response to our decision, the Legislature enacted chapter 71 (see Senate Introducer Letter, May 8, 2002, Bill Jacket, L 2002, ch 71, at 3). Chapter 71, § 1 provides: “Notwithstanding any law, rule or regulation to the contrary, no foreclosure action, nor sale pursuant to an order of foreclosure, shall be permitted on the primary residence of a litigant in a matrimonial action pursuant to a mortgage or security interest given by such litigant to his or her attorney to secure payment of legal fees in connection with such matrimonial action. Nothing in this act shall affect the indebtedness. secured by any such mortgage or security interest.” The statute was enacted on May 21, 2002, and took effect immediately (see L 2002, ch 71, § 2). It was intended primarily to prohibit the foreclosure of all mortgages given to secure payment of legal fees in matrimonial actions, including those obtained prior to the effective date of the rule (see Senate Introducer Mem in Support, Bill Jacket, L 2002, ch 71, at 7).
Relying on chapter 71, defendant moved for an order directing the court-appointed Referee to cease and desist in the sale of her home. Plaintiff cross-moved for a declaration that chapter 71 is unconstitutional, asserting, among other things, that the statute impairs the obligations of existing contracts—i.e., the mortgages that are the subject of this foreclosure action—in violation of the Contract Clause. Supreme Court granted defendant’s motion and denied plaintiffs cross motion. Plaintiff appeals, challenging chapter 71 as it retroactively applies to her under the particular facts of this case.2
The Contract Clause provides that “[n]o [s]tate shall . . . pass any . . . [l]aw impairing the [obligation of [cjontracts” (US Const, art I, § 10). The absolute prohibition set forth in the Contract Clause is not to be read literally; instead, states retain a paramount interest in protecting public welfare through legislation (see Keystone Bituminous Coal Assn. v DeBenedictis, *25480 US 470, 502-503 [1987]; Crane Neck Assn. v New York City/Long Is. County Servs. Group, 61 NY2d 154, 167 [1984], appeal dismissed and cert denied 469 US 804 [1984]). Thus, “the [s]tate may impair [private] contracts by subsequent legislation or regulation so long as it is reasonably necessary to further an important public purpose and the measures taken that impair the contract are reasonable and appropriate to effectuate that purpose” (Crane Neck Assn. v New York City/Long Is. County Servs. Group, supra at 167; see 19th St. Assoc. v State of New York, 79 NY2d 434, 443 [1992]; United States Trust Co. v New Jersey, 431 US 1, 25 [1977]).
The analysis of whether a particular piece of legislation violates the Contract Clause has three prongs (see Energy Reserves Group v Kansas Power & Light Co., 459 US 400, 411-412 [1983]). “The threshold inquiry is ‘whether the state law has, in fact, operated as a substantial impairment of a contractual relationship’ ” (id. at 411, quoting Allied Structural Steel Co. v Spannaus, 438 US 234, 244 [1978]). Even where contractual expectations are not totally destroyed or rendered completely worthless, substantial impairment may exist (see United States Trust Co. v New Jersey, supra at 26-27). Further, courts must consider “whether the industry the complaining party has entered has been regulated in the past” such that further legislation on the same topic is foreseeable in determining whether impairment is substantial (Energy Reserves Group v Kansas Power & Light Co., supra at 411, 416; see Veix v Sixth Ward Bldg. & Loan Assn., 310 US 32, 38 [1940]).
If a statute is found to constitute a substantial impairment, “the [s]tate, in justification, must have a significant and legitimate public purpose behind the regulation, such as the remedying of a broad and general social or economic problem” (Energy Reserves Group v Kansas Power & Light Co., supra at 411-412 [emphasis added and citation omitted]; see Keystone Bituminous Coal Assn. v DeBenedictis, supra at 504-505 [determining that Pennsylvania had a legitimate public interest in restricting amount of coal that could be mined where coal was required to support ground’s surface structure]; Home Bldg. & Loan Assn. v Blaisdell, 290 US 398, 444-445 [1934] [concluding that the need to provide relief to homeowners during a severe economic depression constituted a significant and legitimate public purpose]). This requirement ensures “that the [s]tate is exercising its police power, rather than providing a benefit to special interests” (Energy Reserves Group v Kansas Power & Light Co., *26supra at 412; see 19th St. Assoc. v State of New York, supra at 443). A law with “an extremely narrow focus[, not] . . . enacted to protect a broad societal interest rather than a narrow class,” will not satisfy the significant and legitimate public purpose test (Allied Structural Steel Co. v Spannaus, supra at 248-249 [holding that a law—enacted in response to an automobile company closing one of its plants—that altered the pension plan rights of Minnesota employers violated the Contract Clause]).
The third prong of the inquiry, if a legitimate public purpose is identified, is “whether the adjustment of ‘the rights and responsibilities of contracting parties [is based] upon reasonable conditions and [is] of a character appropriate to the public purpose justifying [the legislation’s] adoption’ ” (Energy Reserves Group v Kansas Power & Light Co., supra at 412, quoting United States Trust Co. v New Jersey, supra at 22). It should be noted that courts defer to legislative judgment regarding the necessity of a particular measure unless the state is a contracting party and its self-interest is at stake (see Energy Reserves Group v Kansas Power & Light Co., supra at 413). Nevertheless, if in the guise of effectuating an important public purpose, a “statute is in reality drawn so restrictively as to benefit only a handful” (19th St. Assoc. v State of New York, supra at 444), it will not be upheld.
Here, the Attorney General urges us to conclude that chapter 71 does not operate as a substantial impairment of the parties’ contractual rights under the mortgages, which concededly were legal at the time they were given. The Attorney General observes that the statute did not reduce the amount of the underlying debt, but merely delayed the availability of a remedy for satisfying the debt. Thus, the Attorney General maintains, the statute does not “wholly deprive” the mortgages of value.
As noted above, however, total destruction is not necessary for a finding of substantial impairment (see Energy Reserves Group v Kansas Power & Light Co., 459 US 400, 411 [1983], supra; United States Trust Co. v New Jersey, 431 US 1, 26-27 [1977], supra). While it is certainly true that “[t]he particular remedy existing at the date of the contract may be altogether abrogated if another equally effective for the enforcement of the obligation remains or is substituted for the one taken away” (Richmond Mtge. & Loan Corp. v Wachovia Bank & Trust Co., 300 US 124, 128-129 [1937]), we agree with plaintiff that chapter 71, which delays foreclosure indefinitely and does not provide an alternate remedy, has a severe impact on the value of *27the mortgages. The US Supreme Court has held that statutory changes to a mortgagee’s right to foreclose, which had the cumulative effect of denying the mortgagee any effective remedy for a minimum of 6V2 years without imposing any conditions that the debtor pay interest, taxes or rental value, were “an oppressive and unnecessary destruction of nearly all the incidents that give attractiveness and value to collateral security” (W.B. Worthen Co. ex rel. Bd. of Commrs. of St. Improvement Dist. No. 513 of Little Rock, Ark. v Kavanaugh, 295 US 56, 62 [1935]). Chapter 71, in delaying the right to foreclose as long as the mortgagor chooses to retain the mortgaged property as his or her primary residence, without imposing any conditions or providing a mechanism for attorneys to seek a waiver of the rule in cases with extraordinary circumstances (see Judiciary Law § 474-a [4]), “take[s] from the mortgage the quality of an acceptable [bargain]” (W.B. Worthen Co. v Kavanaugh, supra at 60; cf. Home Bldg. & Loan Assn. v Blaisdell, 290 US 398, 444-446 [1934], supra [upholding a statute that permitted a court to stay a foreclosure for a maximum period of two years if a showing of necessity was made and certain prescribed conditions were met]). That the mortgage may retain some value and that the underlying debt—effectively rendered unsecured for an indefinite and potentially lengthy time period—is left intact does not render the impairment insubstantial.
In addition, the fact that the legal profession is closely regulated does not mandate a finding that only minimal impairment is present here or render W.B. Worthen Co. v Kavanaugh (supra) inapplicable, contrary to the Attorney General’s argument. As the Attorney General asserts, when regulations exist or have existed regarding the subject matter of the contract or industry in which the parties contracted, subsequent and foreseeable regulation on the same topic will not be considered to have impaired the parties’ “reasonable expectations” (Energy Reserves Group v Kansas Power & Light Co., supra at 416). Thus, for example, the US Supreme Court has held that a natural gas supplier’s reasonable expectations were not substantially impaired by the Kansas Natural Gas Price Protection Act inasmuch as “[p]rice regulation existed and was foreseeable as the type of law that would alter contract obligations” (id. at 416 [emphasis added]; cf. Allied Structural Steel Co. v Spannaus, supra at 245-250 [indicating that a Minnesota statute that altered the pension plan vesting rights of employees whose employers had left the state “did not operate in an area already *28subject to state regulation” and that employers “had no reason to anticipate” that employees’ vesting rights under plans would be altered]).
Although the practice of law has long been subject to extensive and intrusive supervision (see Yeiser v Dysart, 267 US 540, 541 [1925]), we conclude that the restrictions imposed by chapter 71—enacted 11 years after defendant gave Schantz a second mortgage, eight years after the action giving rise to the counsel fees settled, and subsequent to plaintiff obtaining a judgment of foreclosure and sale—were not foreseeable. We note that current court rules and statutes regulating counsel fees generally operate prospectively, applying when representation commenced on or after the effective date of the rule or statute (see L 1985, ch 294, § 25 [setting forth effective date of amended fee schedule in Judiciary Law § 474-a (2)]; 22 NYCRR 137.1 [a]; 1400.1).3 Moreover, none of the statutes and rules cited by the parties that predate the mortgages impaired here contains any indication'that they retroactively affect fees where representation had concluded (see Judiciary Law § 474-a; DR 2-106, DR 5-103, DR 5-104 [22 NYCRR 1200.11, 1200.22, 1200.23]). Although the Attorney General argues that even Schantz’s acquisition of the mortgage conflicted with attorney disciplinary rules, the argument that such mortgages predating the court rules are inequitable has been recently rejected (see Goldman v Goldman, 95 NY2d 120, 122-123 [2000], supra).
Further, the cases from other states relied upon by the Attorney General, to the extent that they support the conclusion that regulation of counsel fees may not be considered to constitute a substantial impairment of contract under certain circumstances, upheld statutes affecting fee arrangements in pending cases, not cases that had concluded years before the statute took effect (see Hicks v Wilson, 182 W Va 660, 662-663, 391 SE2d 350, 352-353 [1990] [indicating that the challenged statutes protected fee arrangements that were lawful at the *29time workers’ compensation awards were made or contracts that might cover future claims]; American Trial Lawyers Assn., N.J. Branch v New Jersey Supreme Ct., 126 NJ Super 577, 593, 316 A2d 19, 28 [1974] [rejecting a challenge to a rule regulating “contingent fee contracts made and partly performed prior to” the effective date of the rule], affd 66 NJ 258, 330 A2d 350 [1974]). In short, nothing in the regulatory climate or existing case law could have led the parties to anticipate that the restrictions in chapter 71 would alter their respective obligations under the contract eight years after Schantz ceased representing defendant. Thus, we conclude that the heavy regulation of the legal practice does not bar a finding of substantial impairment here.
We reject the Attorney General’s argument that it has identified a significant and legitimate public purpose sufficient to avoid a finding that the impairment is unconstitutional. The Attorney General asserts that the concerns that underlie chapter 71 are those articulated in the 1993 report of the Committee to Examine Lawyer Conduct in Matrimonial Actions (hereinafter the Milonas Report), which concluded that “[i]t is indefensible that an attorney may seize a client’s home to satisfy an unpaid fee in a matrimonial case” (Milonas Report at 20). The legislative history reveals, however, that the Legislature was aware that court rules, enacted in response to the Milonas Report, prohibit attorneys in domestic relations matters from foreclosing on a client’s marital residence when representation commenced after 1993 (see Assembly Sponsor’s Mem, May 13, 2002, Bill Jacket, L 2002, ch 71, at 5; Senate Introducer Mem in Support, Bill Jacket, L 2002, ch 71, at 7; Assembly Debate on Assembly Bill A 11200, May 1, 2002, at 50-52; see 288 AD2d 536, 538 n [2001], supra). Indeed, the Assembly Sponsor acknowledged during debate that, since 1993, the rules “ha[ve] been the law, effectively” (Assembly Debate on Assembly Bill A 11200, May 1, 2002, at 52). Thus, while the Milonas Report may have identified “a broad and general social or economic problem” that affected many litigants in 1993 (Energy Reserves Group v Kansas Power & Light Co., 459 US 400, 412 [1983], supra; see Milonas Report at 19) and to which the rules were addressed (see DR 2-106 [c] [2] [iii] [22 NYCRR 1200.11 (c) (2) (iii)]; 22 NYCRR 1400.5 [b]), the statute had a much narrower focus.
Unlike the rules, which had a general effect, the statute was meant to extend the ban on foreclosure to situations in which representation had commenced prior to the effective date of the *30rules—November 30, 1993, nine years prior to the statute’s enactment. One of the primary purposes of chapter 71 was to “prevent the foreclosure sale of [defendant’s] house, since the mortgage in her case was given before the rule went into effect” (Senate Introducer Letter, May 8, 2002, Bill Jacket, L 2002, ch 71, at 3). Although the statute was intended to “providet ] important protection for this particular litigant, and all others in her position” (id. at 3), the Assembly Sponsor indicated that she “ha[d] not heard of other instances where this type of situation has occurred,” explaining that “attorneys understand” the prohibition in the court rules (Assembly Debate on Assembly Bill A 11200, May 1, 2002, at 52) .4 Inasmuch as chapter 71 was aimed largely at protecting a single individual—defendant—and there is no evidence that, after the rules prohibiting foreclosure had been in effect for nine years, any other litigants were similarly situated, we cannot say that the statute was “enacted to protect a broad societal interest rather than a narrow class” (Allied Structural Steel Co. v Spannaus, 438 US 234, 249 [1978], supra; see generally 19th St. Assoc. v State of New York, 79 NY2d 434, 444 [1992], supra). Moreover, the statutory changes do not impose any conditions that the debtor pay interest, taxes or rental value or provide any mechanism for a waiver in cases with extraordinary circumstances. Accordingly, chapter 71 constitutes an unconstitutional impairment of the contracts at issue here.
Our holding renders the parties’ remaining arguments academic.
Peters, Spain and Carpinello, JJ., concur.
Ordered that the order is reversed, on the law, without costs, defendant Jean O’Sullivan’s motion denied, plaintiffs cross motion granted, chapter 71 of the Laws of 2002 is declared uncon*31stitutional, and matter remitted to the Supreme Court for further proceedings not inconsistent with this Court’s decision.
. On a subsequent appeal, we directed a referee to ascertain the precise amount of the debt (302 AD2d 793, 795 [2003]).
. Although the Attorney General was not notified of plaintiffs challenge to the constitutionality of chapter 71 (see Executive Law § 71; CPLR 1012 [b]) and, consequently, did not have the opportunity to defend the statute before Supreme Court, this Court has since given notification and the Attorney General appears in his statutory capacity on this appeal.
. The Attorney General asserts that DR 2-106 (c) (2) (iii) (22 NYCRR 1200.11 [c] [2] [iii]), which, like 22 NYCRR 1400.5 (b), prohibits a lawyer from foreclosing on a mortgage placed on the primary residence of a client in a domestic relations matter, was enacted at the same time as rule 1400.5 (b), but is not subject to any provision specifically limiting its effect to future cases. The prohibition on foreclosure was not filed until 1994, however, three years after Schantz and defendant entered into the second mortgage in 1991 and after the underlying matrimonial action had settled. Therefore, DR 2-106 (c) (2) (iii) (22 NYCRR 1200.11 [c] [2] [iii]) could not have provided notice to the parties that future regulation impacting the mortgages was foreseeable.
. The Attorney General argues that the statute was also intended to expand the prohibition on foreclosure by preventing any attorney who obtains a mortgage from assigning that mortgage to a nonlawyer for the purpose of circumventing the rules’ ban on foreclosure by an attorney (see Senate Introducer Mem in Support, Bill Jacket, L 2002, ch 71, at 7; 22 NYCRR 1400.5 [b]; DR 2-106 [c] [2] [iii] [22 NYCRR 1200.11 (c) (2) (iii)]). Plaintiff, however, expressly indicates that she does not assert that her status as a nonlawyer should have any effect on the issues raised in this litigation. Indeed, contrary to the Attorney General’s argument, we concluded in our prior decision that the assignment to plaintiff, if representation had commenced after the effective date of the rules, “would now clearly violate the ethical rules governing matrimonial attorneys in this State” (288 AD2d 536, 538 n [2001], supra).