delivered the opinion of the Court.
The appellees, Bruce A. Miles and Sharon Miles, his wife, have sued the appellant, Edwin L. Everhart, on the theory *132 of unjust enrichment. We shall affirm the trial court (Circuit Court for Allegany County, Naughton, J.), which awarded restitution to the appellees in the amount of Thirty-three Thousand, Seven Hundred Ninety-four Dollars and Two Cents ($33,794.02) on the ground that the appellant had been unjustly benefited by the actions of the appellees. In so doing, we have' considered the following questions propounded by the appellant:
1. Did the Court err in overruling the demurrer of the Respondent to the Bill of Complaint?
2. Are the Complainants entitled to compensation in equity under the unjust enrichment doctrine where Complainants entered into possession of a farm for which they were negotiating, without a contract, and while without a contract, did without the knowledge and consent of the Respondent, make extensive improvements and repairs to the structures and machinery on the farm, and then countermanded the original offer and substituted a new offer therefor, and upon rejection, terminated their possession and withdrew from the farm without any demand for compensation?
3. Is Complainant entitled to reimbursement for sileage [sic] placed in the two silos prior to his rejection of the contract and subsequent departure?
Doctor Leslie Miles and his son Bruce negotiated with Doctor Edwin L. Everhart in March and April of 1978 for the purchase of some one hundred one acres of land, including barns, silos, and farmhouse for One Hundred, Seventy-nine Thousand Dollars ($179,000.00), along with seventy-five head of Holstein cattle for Fifty Thousand Dollars ($50,000.00) and certain equipment and farm machinery for Fifty Thousand Dollars ($50,000.00), making a total purchase price of Two Hundred, Seventy-nine Thousand Dollars ($279,000.00). The purchasers were to make a Twenty-nine Thousand Dollar down payment ($29,000.00), with a security agreement to cover the cattle and equipment. The cattle *133 and equipment were to be paid for over a ten year period in monthly installments of Eight Hundred, Eighty Dollars and Three Cents ($880.03); the real property was to be acquired through a lease purchase agreement over a period of ten years, with a monthly rental of One Thousand, Three LIundred One Dollars ($1,301.00). At the end of this ten year period, the appellees were to be able to exercise an option to purchase this land. In this regard a purchase money mortgage was to be executed by the appellees in the amount of One Hundred, Seventy-nine Thousand Dollars ($179,000.00), with monthly mortgage payments of Two Thousand, Two Hundred Nineteen Dollars and Forty Cents ($2,219.40).
In May of 1978 Bruce Miles and his wife traveled from North Carolina to the Allegany-Garrett Counties area for the purpose of taking over their proposed purchases. They moved onto the farm on or about 1 June 1978, at which time they made a down payment of Ten Thousand Dollars ($10,000.00) in lieu of the originally agreed upon amount of Twenty-nine Thousand Dollars ($29,000.00). On this same date, a contract of sale was to have been executed; however, for various reasons this was never accomplished and negotiations continued. Nevertheless, the appellees lived on the farm, ran the dairy business, and made certain improvements; for example, they fixed the barn roof, renovated the farmhouse, installed a septic system, and replaced the house pump, despite the absence of a written agreement. Further, they made repairs to a tractor, a silo loader, and a field chopper. Also, through their efforts, approximately six hundred tons of silage were put into the silos; this silage remained behind when the appellees vacated the farm on 21 September 1978.
During the appellees’ stay on the farm, efforts were made by the parties to have a written contract prepared that was agreeable to all parties but this never came about. Eventually, the appellees lowered their total offer for the purchase of the farm, equipment, and cattle to One Hundred and Eighty-nine Thousand Dollars ($189,000.00); this offer was flatly rejected by the appellant, thereby causing the appellees to depart forthwith.
*134 I.
Initially, the appellant demurred to the appellees’ bill of complaint alleging that the appellees had an adequate remedy at law, that the equity court had no jurisdiction over the matter, and that the appellant would have no right to set-off or counter-claim in equity. The docket entry of 1 May 1979 indicates that this demurrer was overruled. In responding to the appellant’s contention that the trial court erred in overruling his demurrer, we will, for purposes of argument, consider as valid the proposition that the equity court did not have jurisdiction originally.
In the case of
Mayor of Landover Hills
v.
Brandt,
This case, which was improperly brought at law, could have been properly brought in equity in the same court before the same judge. If found meritorious, it could have been removed from law to equity. ... We should, therefore, pass upon the merits as if the case had been so brought or removed and should not require a new suit in equity. [Citation omitted].
In each of the above-cited cases, there existed statutory authority for the Court holding that although the suit was instituted in the wrong forum, it could nevertheless be disposed of therein.
See
Maryland Annotated Code (1939) article 75, section 124, and Maryland Annotated Code (1951)
*135
article 75, section 125, entitled "Removal of Cases from Courts of Law to Courts of Equity and Vice Versa.” Despite the repeal of this particular provision by Acts 1957, chapter 399 § 1, the underlying rationale of said statute has survived through Rule 515 of the Maryland Rules of Procedure. As Chief Judge Brune speaking for the Court of Appeals in
Dormay Construction Corp. v. Doric Co.,
[T]he existence of a right to bring an action at law will not oust the jurisdiction of equity if there is any ground upon which relief in equity may be invoked. See also Union Passenger Ry. Co. v. City of Baltimore,71 Md. 238 , . . . holding that the then existing statutory provisions for discovery at law did not oust equity jurisdiction... .[ 1 ]
Because we find that there is a "ground upon which relief in equity may be invoked,” i.e., in section II, infra, we determine that the doctrine of unjust enrichment has been recognized in our equity courts, we are persuaded that even if a court of law would have been the proper forum in which to institute the present case, an equity court could nevertheless exercise jurisdiction.
The complaint that the appellant would be deprived of his right to set-off or a counter-claim seems even less persuasive. We know of no rule of law that prohibits such pleading in a court of equity. In fact, the court’s award provided for a set-off on behalf of the appellant.
We shall therefore hold that the trial court did not err in overruling the demurrer of the appellant to the appellees’ bill of complaint.
II
The second question posed by the appellant can succinctly *136 be expressed as whether, under the circumstances which existed in this case, the trial court erred in awarding compensation to the appellees on the basis of the doctrine of unjust enrichment.
Unjust enrichment is defined as
the unjust retention of a benefit to the loss of another, or the retention of money or property of another against the fundamental principles of justice or equity and good conscience. A person is enriched if he has received a benefit, and he is unjustly enriched if retention of the benefit would be unjust. Unjust enrichment of a person occurs when he has and retains money or benefits which in justice and equity belong to another.
66 Am. Jur. 2d Restitution and Implied Contracts § 3 (1973) (footnote omitted). Similarly, Williston on Contracts § 1479 (3rd ed. 1970) sets forth the three elements that must be established to sustain a claim based on unjust enrichment; these are:
1. A benefit conferred upon the defendant by the plaintiff;
2. An appreciation or knowledge by the defendant of the benefit; and
3. The acceptance or retention by the defendant of the benefit under such circumstances as to make it inequitable for the defendant to retain the benefit without the payment of its value. [Footnote omitted].
Also, in speaking of unjust enrichment Restatement of Restitution § 1 (1937) makes this comment, "[a] person who has been unjustly enriched at the expense of another is required to make restitution to the other.” However, these authorities maintain that unjust enrichment does not exist where the benefit has officiously been thrust upon the defendant. With this in mind, we turn to the facts of the instant case.
*137 Thorn is no doubt that the appellant knew and accepted that the appellees were expending substantial amounts of money for repairs and improvements of his real property. Further, the appellant benefited from the conditioning of his farm equipment, as well as from the retention of certain milk checks that monetized as a result of the appellees’ labors.
The question then arises as to whether or not there was an officious conferrance of these benefits. Restatement of Restitution § 2 (1937) indicates that officiousness is constituted by "interference in the affairs of others not justified by the circumstances under which this interference takes place.” In this regard the appellant argues that the appellees thrust the benefits in question upon him and thus that, he should not be considered to be unjustly enriched. As support he relies on
Gould v. American Water Works Service Co.,
Be that as it may, in our case the appellees were told to *138 take over the farm and run it as they saw fit; in essence, they were told that it was theirs. In fact, although the appellant denies visiting the farm after July 1, he does admit that he did see that the appellees were making certain repairs and improvements thereon. Further, much of the work that was done appears to have been necessary in order to operate the farm. We cannot, therefore, hold that this constitutes officiousness, since it was neither thrust upon the appellant nor strictly voluntary on the part of the appellees.
Maryland has recognized the doctrine of unjust enrichment or restitution or melioration as it is sometimes called. In the case of
Plitt v. Greenberg,
Plitt, however, does possess a colorable cause of action grounded on a theory of unjust enrichment or restitution. Although Greenberg may not have known that he had received the proceeds of Plitt’s check into his account, and no express contract for debt existed between Plitt and Greenberg, the law implies a debt "whenever the defendant has obtained possession of money which, in equity and good conscience, he ought not to be allowed to retain.” [Quoting State, use of Employment Board v. Rucker,211 Md. 153 , 158,126 A.2d 846 , 849 (1956)].
In that same case at page 364,
Another case relied on by the appellant is the equity case
*139
of
Welsh v. Welsh,
In the instant case, on the other hand, the appellees were in possession of the property in question with the whole-hearted approbation of the appellant. In this regard, the lower court found that "| w]ith the consent of the [appellant], the [appellees] took possession of the farm and began to operate it. The parties assumed that a sale’s contract would be executed.” Furthermore, it is apparent that all of the improvements were made during the time that the negotiations concerning the terms of the contract to be executed were continuing.
One final note in reference to the
Welsh
case: there the Court of Appeals quoted with approval at pages 88-89,
"Since the rule that erections or additions made by one who has no rights to land are fixtures, and therefore not removable by him, even though he made them in the belief that he was the owner of the land, is calculated to cause hardships to an innocent occupant of another’s land, by giving the benefit of his labor and expenditures to the landowner, the courts of this country, without either imputing fraud or requiring proof of it, hold it inequitable to allow one to be enriched under *140 such circumstances by the labor and expenditures of another who acted in good faith and in ignorance of any adverse claim or title. Applying this doctrine of'unjust enrichment/ a court of equity will, on the principle that he who seeks equity must do equity, refuse its assistance to the rightful owner of the land as against an occupant thereof unless he makes compensation for permanent and beneficial improvements, made by the latter without notice of the defect in his title.”
At no time during the appellees’ stay on the farm did the appellant question their right to possession. In fact, according to the testimony, the appellant did not visit the farm subsequent to July 1 even though he knew of some of the appellees’ labor and expenditures. Also, we find no assertion on the part of the appellant that he ever questioned the appellees’ right to possession of the property in question or their right to make improvements thereon. As the Court of Appeals stated in
Hamilton and Spiegel, Inc.
v.
Board of Education,
We are therefore constrained to hold that the trial court did not err in awarding compensation to the appellees based on the doctrine of unjust enrichment.
Ill
The appellant questions the entitlement of the appellees to reimbursement for the silage placed in two silos belonging to the appellant. There appears to be no question that the silos were filled through the efforts of the appellees and that they were full or approximately full when the appellees departed. Since the silage was produced as a result of the appellees running the farm as their own, on property leased *141 by them, this calls into play the unjust enrichment doctrine as discussed above. We see no reason to disturb the chancellor’s finding in this regard.
Judgment affirmed.
Costs to be paid by the appellant.
Notes
. (Footnote added). For an interesting treatise of the ever-expanding field of equity and the resultant blurring distinction between law and equity, see Brown, The Law/Equity Dichotomy in Maryland, 39 Md. L. Rev. 427 (1980).
