concurring in part and dissenting in part.
[¶ 25] This appeal requires the Court to consider the extent of Wayne and Dorothy Knope’s liability to Green Tree pursuant to the promissory note they executed that is now owned by Green Tree, and pursuant to the mortgage they executed in favor of a third party—but that was not properly assigned to Green Tree. I concur with the Court’s conclusion that this matter must be remanded for the Superior Court to determine the Knopes’ contract-based liability pursuant to the note. I disagree, however, with the Court’s conclusion that the Knopes are or may be liable for any amount that is encompassed only within the mortgage, and I respectfully dissent from that part of the Court’s opinion.
[¶ 26] The Superior Court (York County, O’Neil, J.) determined that, pursuant to a theory of unjust enrichment, the Knopes are liable for all amounts that would be due under both the note that they executed in favor of GMAC Mortgage Corporation and the mortgage that they executed in favor of GMAC, which granted to MERS only the right to record the mortgage. Green Tree now owns the note and is entitled to enforce its terms. Green Tree did not acquire the mortgage-based rights, however, because the assignment of that instrument from MERS to Green Tree was insufficient to convey those rights.
[¶ 27] After the Knopes fell' into default on the note and tried unsuccessfully 'to obtain information from Green Tree about the amount they owed, they filed this action to force the issue. The resulting trial focused on whether the Knopes are liable for certain charges paid dr incurred by Green Tree: property taxes and insurance on the Knopes’ property, property preservation fees, “foreclosure fees,” and “legal fees.”
[¶ 28] The trial evidence included a copy of the promissory note, which provided that in the event of a default, the holder of the note would be entitled to.recover the costs and expenses of enforcing the note, including reasonable attorney fees. Additionally, the court was presented with the mortgage deed, which provided that the lender would be entitled to reimbursement for its payment of property taxes; hazard and property insurance; costs to secure and protect the property; and, in the event of nonpayment on the note, attorney fees and the costs to foreclose. None of the expenses and charges enumerated in the mortgage overlaps with the amounts due pursuant to the note.
[¶29] In its judgment, the trial court correctly determined that Green Tree could not contractually enforce the rights created in the mortgage, because of the deficient assignment of that instrument from MERS. See Bank of Am., N.A. v. Greenleaf, 2014 ME 89, 96 A.3d 700. “(T]o avoid unjust enrichment,” however, the court allowed Green Tree to retain the entire disputed amount—including the amounts that are recoverable only pursuant to the mortgage.
*704[¶ 30] In my view, the court’s award to Green Tree of those mortgage-based expenses based on the equitable doctrine of unjust enrichment is erroneous for two reasons. First, it amounted to an improper restructuring of the parties’ actual contractual relationship. And second, Green Tree is not entitled to equitable relief when its claim is based on rights created by a mortgage that it knew or should have known it did not own. I will address these points in turn.
A. Existence of a Contractual Relationship
[¶ 31] I agree with the Court’s explanation of the beneficent principles that underlie the doctrine of unjust enrichment. In short, it creates a remedy, available in limited circumstances, to prevent an “inequitable retention of a benefit,” Horton & McGehee, Maine Civil Remedies § 7-3 at 176 (4th ed. 2004), and allows “recovery for the value of the benefit retained when there is no contractual relationship, but when, on the grounds of fairness and justice, the law compels performance of a legal and moral duty to pay,” Paffhausen v. Balano, 1998 ME 47, ¶ 6, 708 A.2d 269.
[¶32] As the Court correctly observes, however, the existence of a contractual relationship between the parties “precludes recovery on a theory of unjust enrichment.” Court’s Opinion ¶ 13; Nadeau v. Pitman, 1999 ME 104, ¶ 14, 731 A.2d 863 (quotation marks omitted); Paffhausen, 1998 ME 47, ¶ 6, 708 A.2d 269; see also Restatement (Third) of Restitution & Unjust Enrichment § 2(2) (Am. Law Inst. 2011) (“A valid contract defines the obligations of the parties as to matters within its scope, displacing to that extent any inquiry into unjust enrichment.”); id. cmt. c; Cty. Comm’rs v. J. Roland Dashiell & Sons, Inc., 358 Md. 83, 747 A.2d 600, 607-08, 608 n.8 (2000) (citing additional cases therein). This is because when the parties themselves define their rights and obligations by entering into a valid and enforceable contract, it is unnecessary and wholly inappropriate for a court to supersede the parties’ own agreement and redefine the relationship that the parties have chosen to create. This critical point is articulated powerfully in authority that the Court itself views favorably: “[W]here the parties have freely, fairly and voluntarily bargained for certain benefits in exchange for undertaking certain obligations, it would be inequitable to imply a different liability and to withdraw from one party benefits for which he has bargained and to which he is entitled.” Wal-Noon Corp. v. Hill, 45 Cal.App.3d 605, 119 Cal.Rptr. 646, 651 (1975); see also Gerlinger v. Amazon.com, Inc., 311 F.Supp.2d 838, 856 (N.D. Cal. 2004). Indeed, it is the very absence of a contract that provides the justification for the law to intervene “on the grounds of fairness and justice” through judicial application of the equitable doctrine of unjust enrichment. See Nadeau, 1999 ME 104, ¶ 14, 731 A.2d 863 (quotation marks omitted).
[¶ 33] Therefore, as a matter of contract—but, contrary to the trial court’s judgment, not unjust enrichment—Green Tree is entitled to recover amounts due from the Knopes pursuant to the note, because the evidence indisputably establishes that Green Tree and the Knopes had a contractual relationship arising from that note. Of the sums claimed here by Green Tree, the note allows recovery of any portion of “legal fees” expended by Green Tree that arose from efforts to enforce the note. I agree with the Court that this matter must be remanded for the trial court to determine that amount.
[¶ 34] The remaining amounts in dispute here—taxes and insurance, property preservation costs, “foreclosure fees,” and any *705portion of “legal fees” not attributable to the note—are not encompassed within the terms of the note but rather would be recoverable pursuant to the provisions of the mortgage. Due to the deficient assignment from MERS, Green Tree did not acquire any rights to foreclose on the encumbered property or to recover expenses identified in the mortgage. The resulting question is whether, based not on breach of contract but rather on a theory of unjust enrichment, Green Tree is entitled to reimbursement for expenses that are only recoverable pursuant to mortgage-based contract rights that Green Tree does not hold. In my view, unjust enrichment is not available to Green Tree as a remedy to recover those mortgage-based expenses, because the mortgage integrally relates to the same subject matter encompassed by the note to which Green Tree and the Knopes were parties.
EU 35] As the U.S. District Court for the District of Maine has reasoned, where a contract between the parties covers “the same subject matter” underlying a claim for unjust enrichment, the existence of that contract operates as a bar to recovery in equity, even where the amounts sought in the unjust enrichment claim are not expressly encompassed within the terms of the contract. Fed. Ins. Co. v. Me. Yankee Atomic Power Co., 183 F.Supp.2d 76, 84 (D. Me. 2001) (applying Maine law). Just as the existence of contractual terms precludes a claim for unjust enrichment on matters directly addressed in that contract, a contract that more generally reveals an intention by the parties “to occupy the universe of their financial relationships” has the same effect, because “[rjecovery under a theory of unjust enrichment independent of or parallel to the [contract] would then be an impermissible end run around a voluntary structuring of relationships and their consequences.” Id. at 85.6
[¶ 36] That is the case here. In the underlying secured loan transaction, GMAC (the original lender) and the Knopes created a comprehensive set of rights and obligations, some of which they chose to make part of the promissory note, with the remainder allocated to the mortgage. The structure of this highly regulated transaction establishes an intent “to occupy the universe of their financial relationship! ]” with regard to the overall loan agreement. Id. Now, Green Tree is left to seek an equitable remedy because it is unable to enforce rights to which GMAC and the Knopes agreed by contract—rights that Green Tree has never acquired.
*706“. [¶37] Green Tree and the Knopes, however, were parties to a contract— namely, the note—that covered the same subject matter as the mortgage forming the basis -for- at least .part of the court’s award. Unjust - enrichment is therefore not available here, because that doctrine is reserved for circumstances where an enforceable contract does not exist and judicial intervention would be needed to prevent an inequitable retention of benefits.. See Paffhausen, 1998 ME 47, ¶ 6, 708 A.2d 269. Because of the unique purposes served by the doctrine of unjust enrichment, it cannot properly be used here as an “end run,” Me. Yankee, 183 F.Supp.2d at 85, to fill in a gap created by Green Tree’s' incomplete acquisition of contract rights benefiting GMAC in the original transaction. In other words, it is not the role of -the courts to redefine a contract into which these parties—including Green Tree, a sophisticated concern that is in the business of engaging in these kinds of transactions—chose to enter.
[¶ 38] I also note that, as Green Tree itself acknowledged at oral argument, invocation of unjust enrichment cannot support an award of attorney fees and expenses incurred in the foreclosure action, because Green Tree’s payment of those expenses did not inure to the Knopes’ benefit. This precludes the availability of an unjust enrichment claim as a matter of law for that aspect of Green Tree’s claim. See Me. Eye Care Assocs., P.A. v. Gorman, 2008 ME 36, ¶ 17, 942 A.2d 707 (stating that one element, of a claim for unjust enrichment is “conferr[ing] a benefit on the other party” (quotation marks omitted)).
[¶ 39] Because the parties were contractually engaged through the note that accompanied the mortgage, Green Tree cannot obtain relief in unjust enrichment for any expenses addressed exclusively in the mortgage. For this reason alone, I conclude that Green Tree is not entitled to reimbursement for taxes and insurance, property preservation costs, and foreclosure fees.7
B. Saunders and Greenleaf
[¶ 40] There is an entirely separate reason why, in the circumstances of this case, Green Tree is not entitled to recover in unjust enrichment: the basis for Green Tree’s claims arose when Green Tree knew or should have' known that it would not have any right to recover any of the expenses otherwise allowed by the mortgage.
[¶ 41] MERS purported to execute an assignment of the mortgage to Green Tree in April 2013. Three years earlier, we issued our decision in Mortgage Electronic Registration Systems, Inc. v. Saunders, a case where MERS sought to foreclose on property based on a mortgage that identified MERS “solely as nominee for Lender”—just as in the mortgage that MERS received from the Knopes. 2010 ME 79, ¶ 9, 2 A.3d 289. In Saunders, we held that the “only rights” that MERS acquired were “bare legal title to the property for the sole purpose of recording the mort*707gage and the corresponding right to record the mortgage with the Registry of Deeds.” Id. ¶ 10. We also concluded,
Not one of the mortgage covenants in the document, including the [mortgagors’] obligations to make timely payments on the note, pay property taxes, obtain property insurance, and maintain and protect the property, is made to MERS or in favor of MERS.
Id. Interestingly for present purposes, the obligations that we happened to enumerate in this passage—expenses that MERS was not able to recoup—include many of the expenses at issue in the case at bar.
[¶ 42] Saunders therefore made clear that a mortgage in the same form used by MERS in the transaction with the Knopes is insufficient to allow MERS to do anything other than record the instrument, and that MERS did not have standing to seek a judgment of foreclosure. Id. ¶¶ 15, 26. Because we had issued our decision in Saunders well before Green Tree accepted an assignment of the mortgage executed by the Knopes, Green Tree was fully on notice' that it would teceive almost nothing through that assignment—and certainly not the rights it seeks to assert in this action.
[1143] Our 2014 decision in Greenleaf was the inevitable and wholly foreseeable next step. In that case, a party to which MERS had assigned a mortgage containing the identical language addressed in Saunders sought to foreclose on the mortgaged premises. We reiterated that a mortgage to MERS as the nominee for the lender gave MERS only the right to record the mortgage and “did not, as a matter of law, grant to MERS any right to foreclose on the property.” 2014 ME 89, ¶ 15, 96 A.3d 700. An assignment of such a mortgage from MERS to some other entity therefore “granted to [the assignee] only what MERS possessed—the right to record the mortgage as nominee—because MERS could not have granted to another person or entity any greater interest in the mortgage than that enjoyed by MERS.” Id. ¶ 16. For the same reason that MERS itself is unable to enforce rights created by the mortgage, MERS’s assignees are left with no arrows in' their quiver. See id. ¶ 17.
[¶ 44] This chronology demonstrates that parties such as Green Tree were fully aware at least as early as 2010 that the type of mortgage that Green Tree purported to acquire from MERS in 2013 would not convey rights to foreclose or to obtain reimbursement of expenses paid pursuant to the provisions of the mortgage. Green Tree accepted that assignment despite being placed on full notice, by our clear explication of the law, of how few rights— if any—it would thereby acquire.8
[¶ 45] Given the chronology of Green Tree’s actions in relation to our decisions explaining the law governing MERS assignments, I conclude that, as a matter of law, Green Tree is not entitled to benefit from the court’s equitable authority to prevent unjust enrichment. Green Tree in fact did not hold the rights that motivated them to incur expenses, and Green Tree can only, have known that. Regardless of *708whether or to what entity the Knopes may bear liability for the charges for which Green Tree seeks recovery, that liability cannot properly be predicated on notions of equity when Green Tree chose to act in disregard of existing law that defined its rights.
[¶ 46] Therefore, on all aspects of Green Tree’s claim against the Knopes except any amount that it can prove is due pursuant to the note, I would vacate and remand for entry of judgment for the Knopes.
. The federal court concluded that Maine Yankee was entitled to proceed with its unjust enrichment claim against Federal Insurance despite the existence of a contract among Maine Yankee, Federal Insurance, and a third party. The circumstances of that action, however, were factually distinct from this case because there the contract primarily defined the relationship between Maine Yankee and the third party. Fed. Ins. Co. v. Me. Yankee Atomic Power Co., 183 F.Supp.2d 76, 82-86 (D. Me. 2001). Federal Insurance “took on no obligations” in that contract, the contract did not identify any benefits that Federal Insurance would receive pursuant to the contract, and Federal Insurance’s role as a signatory to the contract "guaranteed only that it did not object to the arrangement” between Maine Yankee and the third party. Id. at 85. Given these circumstances, the court concluded that “[t]his is not the sort of contractual relationship that, under Maine law and general principles of unjust enrichment, forecloses recovery,” and that Federal Insurance could not use the existence of that contract as a shield against Maine Yankee’s unjust enrichment claim. See id. at 85-86.
In contrast, the .contract between Green Tree and the Knopes—namely, the promissory note—creates rights and imposes obligations on both parties; neither is a bystander, as Federal Insurance was in the contract at issue in that case, which is therefore distinguishable in result.
. Contrary to the Court’s suggestion, see Coúrt’s Opinion at ¶¶ 21-22, this result would not bar a party from seeking remedies available pursuant to a note it owns even where that party did not acquire the mortgage due to a deficient assignment. Viewing a mortgage as one element of the underlying transaction that, also includes the note merely precludes .the owner of-the note from obtaining relief, based on notions of equity, otherwise available pursuant to the mortgage that would have been available as a matter of contract had that party also owned • the mortgage rights. The converse, however, is not true: if a party is barred from asserting a claim pursuant to a mortgage because, like Green Tree, it did not actually acquire that mortgage, that party may nonetheless seek to enforce the provisions of a note that it does own.
. While Green Tree incurred a number of the charges for which it seeks reimbursement from the Knopes before our opinion in Green-leaf was issued, it continued to incur such charges even after the issuance of that decision—and conducted itself apparently as if it possessed the rights that the lessons of Saunders and Greenleaf clearly established it did not have. Nonetheless, the temporal demarcation signified by the date of the Greenleaf opinion is not particularly significant because of the clear holding in Saunders, which was issued years before the assignment from MERS to Green Tree. See Bank of Am., N.A. v. Greenleaf, 2014 ME 89, 96 A.3d 700; Mortg. Elec. Registration Sys., Inc. v. Saunders, 2010 ME 79, 2 A.3d 289.