
50 Md. App. 382 (1982)
438 A.2d 1366
ALAN G. STAHL ET UX.
v.
JOSEPH M. ROULHAC AND THOMAS G. PETER, SUBSTITUTE TRUSTEES ET AL.
No. 93, September Term, 1981.
Court of Special Appeals of Maryland.
Decided January 6, 1982.
The cause was argued before THOMPSON, LISS and BISHOP, JJ., and JAMES S. GETTY, Chief Judge of the Fourth Judicial Circuit, specially assigned.
*383 Thomas A. Garland, with whom was Terry B. Blair on the brief, for appellants.
Roger D. Redden, with whom were David M. Funk and Thomas F. Ireton, on the brief for appellee James W. Rouse & Company. Robert E. Wieder on the brief for appellees Better Built Masonry and Emory N. Stull, Inc.
GETTY, J., delivered the opinion of the Court.
This case arises from a mortgage foreclosure proceeding instituted in the Circuit Court for Howard County on August 25, 1978. The instrument foreclosed upon was a First Deed of Trust executed March 15, 1977, between Tailored Homes, Inc., and James W. Rouse and Company, Inc., covering several lots in a development known as "Eagles Loft" in Howard County. Aggrieved by the Special Auditor's distribution of the surplus proceeds are Alan G. Stahl and Jessie D. Stahl, his wife, contract purchasers from Tailored Homes of Lot No. 18.

STATEMENT OF FACTS
On September 4, 1977, the Stahls entered into an Agreement of Sale with Tailored Homes for the purchase of Lot 18 and the construction by the seller of a house thereon for the total sum of $110,000. A down payment of $10,100 was made with the balance due at the time of settlement.
At the time of the Agreement of Sale, Lot 18 was subject to a First Deed of Trust executed by Tailored Homes to Rouse to secure a land acquisition loan. On January 4, 1978, Tailored Homes entered into a Second Deed of Trust with Rouse to cover the cost of construction of homes previously contracted for on Lots 13, 18 and 19. This Second Deed of Trust was taken by Rouse with knowledge of the Agreement of Sale between Tailored Homes and the Stahls. The existence of these contracts and loan commitments form the principal basis for the construction loan from Rouse to Tailored Homes.
*384 Tailored Homes defaulted on the land acquisition loan prior to completion of the Stahl home on Lot 18. At the foreclosure sale the Stahls purchased Lot 18 for the sum of $119,000. After satisfaction of the debt secured by the First Deed of Trust a surplus remained in the amount of $101,781.10. The special Auditors distributed to the Stahls their down payment of $10,100 and to Rouse $73,690.97 in satisfaction of its claim under the Second Deed of Trust securing the construction loan. The remaining surplus was distributed to other claimants. The other lots, 7, 13 and 19, were also sold, but those transactions are not material to the issues raised herein.
The Stahls filed two claims. The first set forth their contract purchaser position claiming their right to the equity of redemption of Tailored Homes under the First Deed of Trust. The second was for the $10,100 down payment representing a partial judgment the Stahls were entitled to in an action against Tailored Homes for breach of contract.

THE ISSUE
Where a second mortgagee has actual knowledge of an existing contract for the sale of that property and the first mortgage is thereafter foreclosed, what are the rights of the contract purchaser and the second mortgagee to the surplus resulting from the foreclosure.

THE LAW
Rouse concedes that by reason of its prior knowledge of the Stahl contract at the time of the Second Deed of Trust, a priority claim exists in favor of the Stahls for the $10,100 contract deposit as a "Vendees Lien". Authority for this prior lien is set forth in Gribble v. Stearman & Kaplan, Inc., 249 Md. 289 (1968), Gerber v. Karr 231 Md. 180 (1963) and Spruell v. Blythe 215 Md. 117 (1957) wherein the Court of Appeals recognized that one who purchases real property under an executory contract of sale is entitled, in equity, to a lien on the land to the extent of payments made on the *385 purchase price. This equitable lien is enforceable not only against the seller, but also against any person who subsequently acquires an interest in the property with knowledge of the existing contract, Gribble, supra.
The Stahls contend that Rouse, having knowledge of the prior contract of sale, is not a bona fide purchaser and is not entitled to any of the surplus. They further assert that if they are limited to their equitable lien, they are entitled to reimbursement for amounts expended by them toward completion of the property in addition to the down payment of $10,100. Had they been permitted to present evidence of these expenditures in the Court below, their claim would amount to $45,629.89, including:


    $10,100.00 ... Deposit
      8,129.60 ... Cash options
      4,212.00 ... Addl. price at foreclosure
      1,878.29 ... Int. from forecl. to settlmt.
     14,250.00 ... Completion of contract
      2,500.00 ... Driveway per contract
      3,960.00 ... Sellers VA points
        600.00 ... Tax loss from rental
    ____________
    $45,629.89

In support of their claim that Rouse is not entitled to any of the surplus, the Stahls rely on Gore v. Condon 82 Md. 649 (1895), wherein the Court ruled that a party who takes a mortgage knowing that the property has been purchased and partly paid for acquires no right which he can enforce against either the property or the contract purchaser.
Gore, however, is factually distinguishable from the present case. The mortgage in that case was not taken to secure any loan to improve the property and at the time of the attempted foreclosure the contract purchaser had fully performed and title had been conveyed to her. Briefly stated, the facts in Gore establish that a father contracted to sell his daughter an improved property. She took possession and made all scheduled payments thereon. Prior to full performance, *386 the father executed a mortgage for no monetary consideration to a man who knew that the daughter was living in and paying for the property. After receiving a deed from her father's executor, the daughter was confronted with an attempt by the mortgagee to foreclose. Dismissal of the daughter's bill in equity to enjoin the foreclosure and annul the mortgage was reversed by the Court of Appeals.
A careful reading of Gore does not establish that a mortgagee taking with knowledge of a prior contract of sale is precluded from asserting any claim to a surplus after foreclosure. Such a result would lead to unjust enrichment of the contract purchaser at the expense of the mortgagee who has provided the funds to improve the property. Permitting the Stahls to obtain a property they contracted to buy for $110,000 for the down payment of $10,100 would be totally inequitable.
A brief review of Maryland cases dealing with the issues herein reveals the following:
Grayson v. Buffington 233 Md. 340 (1963), cited by the Stahls, recognizes that one who purchases real property with actual knowledge of prior equities is not protected as a bona fide purchaser, but such a purchaser takes the property subject to the known equities which are enforceable against him to the same extent that they are enforceable against the vendor. In accord, Westpark v. Seaton Land Co., 225 Md. 433, Blondell v. Turnover 195 Md. 251, Lissau v. Smith 215 Md. 538.
In Irvington Fed. Savings & Loan v. West 194 Md. 211 (1950), the Court of Appeals determined that a vendee's lien was not entitled to priority over a subsequent mortgage in the absence of actual or constructive notice of the existing contract when the mortgage was executed. By implication, if a mortgagee does have knowledge of an existing contract of sale, the mortgagee's interest is subject to the equitable lien of the contract purchaser. This rationale is consistent with the decision in Grayson, supra, and with the result reached herein by the Circuit Court for Howard County. It is clear, therefore, that the mortgagee with notice is not denied the *387 right to share in the surplus, but the mortgagee's claim is inferior to the vendee's lien.
Having determined that the vendee's lien takes predence over the claim asserted by Rouse under the Second Deed of Trust due to the knowledge of the existence of the prior contract, admitted by Rouse, we turn to the question of what disbursements may be appropriately included in determining the value of the equitable lien.
The Court of Appeals in Gribble v. Stearman 249 Md. 289 (1968), held that a vendee is entitled to an equitable lien on land which is the subject of the sales contract to the extent of the payments made on the purchase price; that the lien arises only in the event that the contract, through the vendor's fault, is not consummated. The Stahls contend that the only amount in issue in Gribble was the down payment and that case, therefore, is not authority for limiting the recovery to the initial deposit. If, however, the Court of Appeals had intended that a vendee's lien should extend to all losses incurred by a contract purchaser rather than a return of money paid on the contract it could have so indicated; it did not.
A return of deposit was similarly ordered in Wayne Bldg. & Loan Co. v. Yarborough 228 N.E.2d 841 (Sup. Ct. of Ohio) 1967, wherein that court determined that the equitable lien of the vendee is based upon money paid on the contract, not simply on the contract itself. Analysis of the authorities confirms this conclusion. See Palmer v. Crews Lumber Co. 510 Pac.2d 269 (Okla.) 1973, National Indemnity Co. v. Banks 376 Fed 2d 533 (5th Cir.1967), Annot. 82 ALR 3d 1040.
Applying the rule stated in Grayson, supra, to the facts herein, the "known equities" chargeable to Rouse are set forth in the contract. An examination of that contract would reveal that the Stahls had paid $10,100 toward the purchase price of a lot and house to be constructed with a balance due upon completion of $95,200.00. By addendum the total contract price was raised to $110,000.00 due to additional improvements. The contract further discloses, paragraph 9, *388 that in the event the seller fails to complete the dwelling or deliver marketable title, the seller's liability shall be limited to the return of the buyer's payments hereunder.
The "known equities" when Rouse executed the Second Deed of Trust, therefore, consisted of the deposit made by the Stahls. Rouse was under no obligation in determining "known equities" to seek out the purchasers to determine if any private agreements had been negotiated between the seller and the purchaser, or if the contract purchaser had voluntarily expended sums not provided for in the contract. The Circuit Court for Howard County properly refused any testimony of the Stahls' losses beyond the deposits made. Finding no error in the distribution made by the Special Auditors, we affirm.
Judgment affirmed.
Costs assessed to appellants.
