
674 A.2d 923 (1996)
MUNDACA INVESTMENT CORPORATION
v.
Louis H. EMERY et al.
Supreme Judicial Court of Maine.
Submitted on Briefs October 2, 1995.
Decided April 18, 1996.
*924 David J. Jones, Jensen, Baird, Gardner & Henry, Portland, for Plaintiff.
John M. Whalen, Lewiston, for Defendants.
Before WATHEN, C.J., and ROBERTS, GLASSMAN, CLIFFORD, RUDMAN, DANA, and LIPEZ, JJ.
DANA, Justice.
Louis H. and Lucille A. Emery appeal from a judgment of foreclosure and sale entered in the Superior Court (York County, Cole, J.) on Mundaca Investment Corporation's motion for a summary judgment. The Emerys contend that their affirmative defense that Mundaca's assignor violated the Equal Credit Opportunity Act, 15 U.S.C. § 1691-1691f[1] (1982 & Supp.1995) (ECOA), precluded summary judgment. We agree and vacate the judgment.
In 1988 the Emerys executed a promissory note in the amount of $100,000 payable on demand to the Somersworth Bank and secured by a mortgage on their real property in Buxton. Subsequently, the Bank was placed in receivership; the Federal Deposit Insurance Corporation, acting in its capacity as the receiver for the Bank, assigned the note and mortgage to Mundaca; and in 1994 Mundaca instituted this foreclosure action. The Emerys raised as an affirmative defense that the Bank violated the ECOA by illegally requiring Lucille to execute the mortgage and note although she was not a loan applicant and Louis was independently creditworthy.[2] While reserving judgment on Lucille's ECOA affirmative defense to the extent of her liability for any deficiency, the court granted Mundaca's motion for a summary judgment and, pursuant to M.R.Civ.P. 54(b)(1),[3] entered it as a final judgment, allowing *925 Mundaca to proceed with a foreclosure and sale of the real estate and to pursue any deficiency against Louis.
A summary judgment is proper if the pleadings, affidavits, or any other discovery material establish that there is no genuine issue of material fact and that a party is entitled to a judgment as a matter of law. M.R.Civ.P. 56(c). When reviewing an appeal of a grant of a summary judgment, we view the evidence in the light most favorable to the party against whom the judgment was granted to determine if the trial court committed an error of law. Bouchard v. American Orthodontics, 661 A.2d 1143, 1145 (Me. 1995).
Although an affirmative action under the ECOA would be barred by the ECOA's two year statute of limitations, a defense in the nature of recoupment would not be time barred.[4]Federal Deposit Ins. Corp. v. Notis, 602 A.2d 1164, 1166 (Me. 1992). In Notis we held that a summary judgment of foreclosure was precluded because of the affirmative defense that the lender violated the ECOA when it illegally required the spouse's signature on the promissory note although she was not an applicant for the loan. Id. at 1165-66. The allegation of an ECOA violation may be asserted as an affirmative defense to the liability on the debt by either the applicant or the spouse. It therefore constitutes a genuine issue of material fact precluding a summary judgment. Although the court preserved Lucille's affirmative defense, it erred when it sacrificed Louis's.
The entry is:
Judgment vacated. Remanded for further proceedings consistent with the opinion herein.
All concurring.
NOTES
[1]  15 U.S.C. § 1691(a) provides in pertinent part: "[i]t shall be unlawful for any creditor to discriminate against any applicant, with respect to any aspect of a credit transaction ... on the basis of ... sex or marital status...."
[2]  Regulation B, 12 C.F.R. § 202.1-202.14 (1995), contains the implementing regulations for the ECOA. Section 202.7(d)(1) states in pertinent part: "a creditor shall not require the signature of an applicant's spouse or other person, other than a joint applicant, on any credit instrument if the applicant qualifies under the creditor's standards of creditworthiness for the amount and terms of the credit requested."

Also, 12 C.F.R. 202.7(d)(5) provides: "[i]f ... the personal liability of an additional party is necessary to support the extension of the credit requested ... [t]he applicant's spouse may serve as an additional party, but the creditor shall not require that the spouse be the additional party."
[3]  M.R.Civ.P. 54(b)(1) states in relevant part:

[W]hen more than one claim for relief is presented in an action ... or when multiple parties are involved, the court may direct the entry of a final judgment as to one or more but fewer than all of the claims or parties only upon an express determination that there is no just reason for delay and upon an express direction for the entry of judgment.
[4]  An action based on a violation of the ECOA must be brought within two years from the date of the occurrence of the violation. 15 U.S.C. § 1691e(f) (1982). "[A] `recoupment' is a reduction of part of the plaintiff's damages because of a right in the defendant arising out of the same transaction." Inniss v. Methot Buick-Opel, Inc., 506 A.2d 212, 217 (Me.1986) (citations omitted).
