
476 So.2d 618 (1985)
Thomas Jerry OAKES
v.
MICHIGAN OIL COMPANY, a Michigan corporation.
84-84.
Supreme Court of Alabama.
September 13, 1985.
*619 C. Park Barton, Jr. of Barton & Maddox, Tuscaloosa, for appellant.
James J. Sledge of Rosen, Harwood, Cook & Sledge, Tuscaloosa, for appellee.
BEATTY, Justice.
This is an appeal by Thomas Jerry Oakes from an order dissolving a preliminary injunction and finding valid, as a matter of law, a subordination agreement. We affirm.
The relevant facts are as follows: Appellant Oakes is the owner of a 163-acre tract of land situated in Lamar County. This tract of land is subject to several mortgages, an oil and gas lease, and various other liens and claims that are not relevant to this appeal.
The first mortgage on the property, a Farmers Home Administration (FHA) mortgage, was given on November 6, 1975, securing a note in the principal amount of $21,410. The FHA mortgage was duly recorded in the probate office of Lamar County.
On July 23, 1979, Oakes and his former wife, Joan Oakes, executed an oil and gas lease in favor of Charles L. Cherry & Associates, Inc.; however, this lease was not recorded until September 27, 1979. Between the time the lease was executed and the time it was recorded, a second mortgage was given on the property. On August 17, 1979, Oakes and his former wife executed a promissory note in favor of the First State Bank of Lamar County in the principal amount of $150,000, secured by a Small Business Administration mortgage (SBA-1) also dated August 17, both of which were duly recorded in the probate office of Lamar County. Thus, although the oil and gas lease was executed prior to the execution of the SBA-1 mortgage, the SBA-1 mortgage was recorded before the lease was recorded. An undivided 85% interest in the lease was assigned to Michigan Oil Company (Michigan Oil) on June 30, 1980.
Thereafter, a third mortgage was given on the property. On October 21, 1980, Oakes and his present wife, Sarah Kate Oakes, executed another promissory note in favor of the First State Bank of Lamar County in the principal amount of $50,000, secured by a Small Business Administration mortgage (SBA-2), also dated October 21, both of which were duly recorded. The First State Bank subsequently assigned both the SBA-1 and SBA-2 mortgages to the Small Business Administration by an instrument dated January 9, 1982.
*620 By June of 1982, Michigan Oil had completed a gas well unit on lease property, which includes approximately 118 acres of land owned by Oakes. According to a Michigan Oil report of production through March of 1984, this well's net production amounted to $260,501.81. Of that amount, $96,060.40 was attributable to Oakes's 118 acres.
Oakes defaulted on both the SBA-1 and SBA-2 mortgages, but before foreclosure proceedings were instituted, both mortgages were assigned by the Small Business Administration to Michigan Oil by instruments dated May 9, 1983. Oakes continued in default, and on May 22, 1984, Michigan Oil recorded an instrument entitled "Subordination of Lien," by which Michigan Oil, as mortgagee, purported to agree with itself, as lessee, to subordinate the SBA-1 mortgage to the lease. In their brief, counsel for Michigan Oil explained its rationale:
"Michigan [Oil], upon learning of default in the mortgages and the threatened foreclosure, realized that with the then existing order of priority, foreclosure would cut off the lease.... To protect its interest under the lease, Michigan [Oil] bought the mortgages and subordinated the SBA-1 mortgage to the lease." (Emphasis added.)
Then, approximately three weeks after it recorded the subordination "agreement," Michigan Oil began foreclosure proceedings against Oakes on the SBA-1 and SBA-2 mortgages. On June 13, 1984, Michigan Oil published the foreclosure sale notice which stated that the sale would take place July 2, 1984.
Under the terms of these two mortgages, Oakes agreed that upon foreclosure "all equity or right of redemption" would be barred, and he thereby expressly waived these redemption rights.
After the foreclosure sale notice, Oakes filed a complaint in Lamar Circuit Court seeking a preliminary injunction to restrain Michigan Oil from foreclosing. Following a hearing, the court granted the preliminary injunction on June 27, 1984, and set the matter down for further hearing on September 18, 1984. At that hearing, Oakes attempted to show that there were some discrepancies in the production reports submitted by Michigan Oil. These alleged discrepancies are not raised as issues in this appeal. Oakes further claimed that the purported subordination by Michigan Oil was invalid, and that, although the lease provided that he received only three sixteenths of the net production as a royalty, the entire proceeds (sixteen-sixteenths) should have been applied towards the satisfaction of the FHA and the SBA-1 mortgages, because they were prior to and thus superior to the lease. Following this hearing, the trial court entered an order dissolving the preliminary injunction and holding valid, as a matter of law, the purported subordination "agreement" recorded by Michigan Oil subordinating the SBA-1 mortgage to the lease. It is from this order that Oakes appeals.
The issues presented on appeal are (1) whether the trial court was correct in its determination that the subordination agreement was valid and (2) whether the preliminary injunction should be reinstated.
It is clear from the language contained in the instrument entitled "Subordination of Lien" that Michigan Oil intended it to be, and to operate as, an "agreement," and Michigan Oil does not dispute this. The "agreement" states in pertinent part:
"WHEREAS, Michigan Oil Company, as owner of the Mortgage, has agreed to subordinate the indebtedness and lien secured and created by said Mortgage, and the rights thereunder, as more specifically hereinafter provided.
"NOW THEREFORE, pursuant to said agreement and in consideration of the sum of Ten Dollars ($10.00) and other good and valuable consideration running to Michigan Oil Company, the receipt and sufficiency of which is hereby acknowledged, Michigan Oil Company, as owner of the Mortgage, for itself and its successors and assigns, does hereby covenant, consent and agree with the lessee under the Lease, its successors and assigns, that all indebtedness and *621 liens held by Michigan Oil Company pursuant to the Mortgage are and shall continue to be subject and subordinate to the Lease and all rights and estates granted by the Lease, but only insofar as the interest of the lessee under said Lease, its successors and assigns. The interests of those parties entitled to receive royalties under the Lease shall be and remain subject to the lien created by the Mortgage until such time as said mortgage is paid in full and satisfied, foreclosed, subordinated or otherwise released by the undersigned, their successors or assigns.
"....
"BUT THIS AGREEMENT AND SUBORDINATION shall in no wise affect or impair the rights of the undersigned Michigan Oil Company, its successors or assigns to hold, foreclose or sell under said Mortgage, in any manner prescribed by contract or law, all of the lands, hereditaments and appurtenances and estates therein, save and except the rights, titles, estates and privileges of the said lessee, and the assignees of the lessee, under the Lease.
"EXECUTED THIS 16th day of May, 1984.
"MICHIGAN OIL COMPANY, as holder of the Mortgage above described
   "By /s/ John J. Smith
"Its President" (Emphasis added.)
It should be noted that although this "agreement" inures to the benefit of Charles L. Cherry & Associates, Inc., to the extent of its remaining 15% interest in the lease, the agreement does not recite any consideration given by Cherry & Associates, nor does the record contain any evidence of any consideration given by Cherry & Associates.
At the outset, we note that subordination agreements are contracts, and such agreements, in order to be valid, must contain the requisite elements of a contract. Republic National Life Ins. Co. v. Lorraine Realty Corp., 279 N.W.2d 349 (Minn.1979). The elements of a contract include: (1) agreement; (2) consideration; (3) two or more contracting parties; (4) a legal object; and (5) capacity. Freeman v. First State Bank of Albertville, 401 So.2d 11 (Ala.1981). Thus, contrary to the form of the instrument filed and the arguments made by Michigan Oil, the "Subordination of Lien" is not a contract, inasmuch as it purports to be an "agreement" by and between the same party, albeit in different capacities: Michigan Oil as mortgagee and Michigan Oil as lessee. Perhaps Michigan Oil chose this "form" as the means of accomplishing the subordination simply because there is ample authority that an actual subordination agreement, based on a valid consideration, is necessary. See 59 C.J.S. Mortgages § 218, p. 289 (1949); 51 Am.Jur.2d Liens § 55, pp. 187-88 (1970); 4 H. Williams, Oil and Gas Law, § 697.3, at p. 533, and § 578 at p. 676 (1984); R. Hemingway, The Law of Oil and Gas, § 5.6, at pp. 218-21 (2d ed. 1983); Ledbetter, "Mortgages on Land Affecting Subsequent Mineral Interests," 32 Tex.L.Rev. 740 (1954).
Nevertheless, all of these authorities presuppose that there are at least two parties with competing interests: the mortgagee with the superior interest and the lessee with the subsequent mineral interest. In this case, however, where the title interest and the leasehold interest are held by the same party, and, therefore, merged, a subordination "agreement" is impossible and, in fact, unnecessary. While we have not been cited to, nor have we found, any similar cases that expressly validate or invalidate the steps taken by Michigan Oil in this case to protect its leasehold interest upon foreclosure (viz., buying the SBA-1 mortgage and subordinating it to the lease), we conclude that in this case these steps were, nevertheless, proper under the terms of the oil and gas lease in question.
The lease contains the following provision, which, among other things, allows Michigan Oil to buy the outstanding superior mortgage "for its own benefit":
"Lessor's rights and interests hereunder shall be charged primarily with any mortgages, taxes or other liens, or interest and other charges on said land, but lessor *622 agrees that lessee shall have the right at any time to pay or reduce same for lessor, either before or after maturity, and be subrogated to the rights of the holder thereof and to deduct amounts so paid from royalties or other payments payable or which may become payable to lessor and/or assigns under this lease. Lessee is hereby given the right to acquire for its own benefit deeds, leases, or assignments covering any interest or claim in said land which lessee or any other party contends is outstanding and not covered hereby and even though such outstanding interest or claim be invalid or adverse to lessor." (Emphasis added.)
Thus, under this provision, Michigan Oil, having acquired the SBA-1 mortgage, was free to subordinate it to the lease, thereby preserving Michigan Oil's more valuable leasehold interest upon its foreclosure on the SBA mortgages.
The general rule with respect to fixing the legal order of priority is stated at 59 C.J.S. Mortgages § 229, p. 296-97 (1949), as follows:
"The legal order of priority as between mortgages and other liens or claims may be fixed, reversed, or modified by an agreement of the parties or by a waiver or release on the part of the senior lienholder." (Emphasis added.)
In effect, what Michigan Oil has done in this case is "waive or release" the priority of the mortgage in favor of the lease, and such change in the order of priorities is clearly "for its own benefit."
Oakes contends that allowing Michigan Oil to subordinate the mortgage to the lease would result in a harsh and unjust conclusion for Oakes because, upon foreclosure, Oakes would have no recourse for the loss of his property and livelihood. First of all, we point out that it has been held that the consent of the mortgagor is unnecessary to effect a change in the order of priority as between a mortgagee and the holder of any other outstanding interest in the property, such as another mortgagee, a lessee, or a lienholder. See Putnam v. Broten, 60 N.D. 97, 232 N.W. 749 (1930); Morgan v. Kline, 77 Iowa 681, 42 N.W. 558 (1889). We perceive no reason why the same principle should not apply where the mortgage interest and the leasehold interest are merged. Second, as sympathetic as we may be to his financial plight, the fact remains that Oakes freely and voluntarily entered into the SBA mortgage agreement, as well as the oil and gas lease, and, under the express terms of each, accepted the benefits of both bargains. Now, having failed to repay as scheduled the indebtedness due on the mortgages, Oakes must face the legal consequences, as they are expressly provided for.
Therefore, under the facts of this case, we conclude, as a matter of law, that Michigan Oil, as holder of both the SBA-1 mortgage and the oil and gas lease, had the right to unilaterally change the order of priority by subordinating the mortgage to the lease. Oakes does not dispute the fact that he is in default on both mortgages. Oakes having failed to show any reason why Michigan Oil should not proceed with the foreclosure, the trial court correctly dissolved the preliminary injunction. Accordingly, the judgment below is due to be, and it hereby is, affirmed.
AFFIRMED.
TORBERT, C.J., and MADDOX, FAULKNER, JONES, ALMON and ADAMS, JJ., concur.
