
855 F.Supp. 280 (1994)
BANE-NELSON, INC., Plaintiff,
v.
HERITAGE BANK & TRUST and U.S. Small Business Administration, Defendants.
Civ. A. No. 93-C-1198.
United States District Court, E.D. Wisconsin.
June 15, 1994.
William O. Kupfer, Kupfer & Kupfer, Kenosha, WI, for plaintiff.
Paul F. Linn, Michael Best & Friedrich, Milwaukee, WI, for defendant Heritage Bank.
Susan M. Knepel, Asst. U.S. Atty., Milwaukee, WI, for defendant USA.

DECISION AND ORDER
REYNOLDS, District Judge.
Plaintiff Bane-Nelson, Inc. ("Bane-Nelson"), claims that defendants Heritage Bank & Trust ("Heritage") and the U.S. Small Business Administration ("SBA") were unjustly enriched when they foreclosed on certain property after its value had been substantially increased as a result of construction work performed by Bane-Nelson.[1] Heritage has moved to dismiss on the ground that the foreclosure judgment bars this action and on the alternative ground that the complaint fails to state a claim for which relief can be granted. For reasons set forth below, the motion will be granted.


*281 I. Facts
The complaint alleges the following. Leroy and Dawn Hagerty ("the Hagertys") executed notes to the SBA and to Heritage in September 1987 and April 1989, respectively, and both notes were secured by mortgages on commercial property owned by the Hagerty's in Kenosha, Wisconsin. In May 1990, the Hagertys contracted with Bane-Nelson for the construction of an addition to the property at a cost of about $112,000. Bane-Nelson entered into the contract in reliance on the Hagertys' assurances that Heritage would finance the project and that Heritage and the SBA were aware of the construction as it proceeded. Upon completion of the project, Bane-Nelson, having not been paid, filed a construction lien and obtained a judgment against the Hagertys in the amount of $137,991. As a result of the construction, the value of the property increased from about $77,800 to about $190,000.
In July 1992, Heritage filed an action to foreclose on its mortgage. (This court takes notice of the proceedings in that action, which the instant complaint mentions in general terms.) The foreclosure complaint named Bane-Nelson and the SBA, among others, as defendants with subordinate interests in the property. Bane-Nelson failed to answer the complaint, and, in a February 3, 1993 judgment of foreclosure, its construction lien was adjuged "subsequent, subordinate and junior" to Heritage's interest in the property. At a sheriff's sale held in August 1993, Heritage and the SBA jointly purchased the property for $200,000. The sale was confirmed the following month.

II. Analysis
Heritage contends that under the principle of res judicata, the judgment of foreclosure bars Bane-Nelson's claim for unjust enrichment. Resolution of this issue depends on state law, the judgment having been rendered by a state court. GASH Assoc. v. Village of Rosemont, 995 F.2d 726, 728 (7th Cir.1993). Wisconsin law provides that a judgment bars a subsequent claim if the parties to the claim were also parties to the action in which judgment was rendered, the subsequent claim could have been brought in that action, and the subsequent claim arises out of the same "transaction" as the previous action. DePratt v. West Bend Mut. Ins. Co., 113 Wis.2d 306, 310-12, 334 N.W.2d 883 (1983); A.B.C.G. v. First Bank Southeast, N.A., 178 Wis.2d 370, 377-78, 504 N.W.2d 382 (App.), review granted, 510 N.W.2d 136 (1993); Great Lakes Trucking Co., Inc. v. Black, 165 Wis.2d 162, 168-69, 477 N.W.2d 65 (App.1991). This rule applies even if the subsequent claim would had to have been brought as a counterclaim in the previous action. A.B.C.G., 178 Wis.2d at 377, 504 N.W.2d 382. See also First Wisconsin Nat'l Bank of Milwaukee v. Federal Land Bank of St. Paul, 849 F.2d 284, 289-90 (7th Cir.1988).
Bane-Nelson contends that res judicata does not apply because although this action involves a few of the parties to the foreclosure action, it does not involve all of them. This is incorrect. For purposes of res judicata, it is enough that the parties to this action were also parties to the foreclosure action. See, e.g., First Wisconsin, 849 F.2d at 289 (holding that a judgment in a foreclosure action involving the mortgagee, the mortgagor, and a creditor of the mortgagor bars a subsequent action between the creditor and the mortgagee).
Bane-Nelson next contends that it could not have brought its claim prior to entry of the foreclosure judgment because the claim did not accrue until Heritage and the SBA were enriched as a result of the sheriff's sale. The court disagrees. Bane-Nelson's claim may have accrued as early as the date construction was completed, and it certainly had accrued by the time Heritage formally asserted a superior interest in the property. That the result of the sheriff's sale might have made the claim unnecessary is irrelevant to the question of whether the claim could have been brought.
Finally, Bane-Nelson contends that this action does not arise out of the same transaction as the foreclosure action. In the latter, according to Bane-Nelson, the fundamental issue was whether the Hagertys were in default on their note, whereas here the issue is whether it is unjust for Heritage to reap the benefit of improvements made by Bane-Nelson. Further, Bane-Nelson says, the *282 foreclosure action only determined the rights in the subject property, whereas here Bane-Nelson asserts not a right in the property but a right against Heritage and the SBA personally.
Neither characterization of the respective actions supports Bane-Nelson's position, however. As between Heritage and Bane-Nelson, the fundamental issue in the foreclosure action was not whether the Hagertys had defaulted on their note, but whether Heritage enjoyed a right in the property superior to that of Bane-Nelson. The same "transaction" underlies the instant dispute, for here the claim is that by asserting and enforcing its superior right, Heritage was unjustly enriched. Further, it is irrelevant whether, as Bane-Nelson asserts, the foreclosure action concerned rights in property and this action does not. The application of res judicata turns not on the nature of the right being asserted, but on the nature of the transaction underlying whatever right is asserted. DePratt, 113 Wis.2d at 311, 334 N.W.2d 883.
The court therefore concludes that Bane-Nelson's claim against Heritage is barred by res judicata. Because the SBA has neither joined in Heritage's motion to dismiss nor filed its own motion, the court does not presently decide whether the same conclusion applies to the claims against the SBA.
IT IS THEREFORE ORDERED that Heritage's October 29, 1993 motion to dismiss is GRANTED and the claims against Heritage are DISMISSED.
IT IS FURTHER ORDERED that on or before 21 days from the date of this order, the SBA shall file a brief and, if appropriate, a motion to dismiss, discussing how this decision and order bears on the claims against it; Bane-Nelson shall file its response within 14 days of being served with the brief; and the SBA shall file its reply 7 days after being served with the response.
NOTES
[1]  This action was removed to this court from the Kenosha County, Wisconsin, Circuit Court on November 1, 1993.
