
267 Cal.App.2d 461 (1968)
LORRAINE PROUTY GRIFFIS, Plaintiff, Cross-defendant and Appellant,
v.
F. RONALD SQUIRE et al., Defendants, Cross-complainants and Respondents.
Civ. No. 8944. 
California Court of Appeals. Fourth Dist., Div. Two.  
Nov. 18, 1968.
 Di Giorgio, Davis & Nairn, Di Giorgio, Davis, Nairn & Klein, Di Giorgio, Davis, Nairn, Hastin & Klein, V. P. Di Giorgio and Thomas R. Davis for Plaintiff, Cross-defendant and Appellant.
 Donald G. Kendall for Defendants, Cross-complainants and Respondents.
 Frame & Courtney and Ted R. Frame as Amici Curiae on behalf of Defendants, Cross-complainants and Respondents.
 FOGG, J. pro tem.  [fn. *]
 Plaintiff brought the present action to quiet title to 320 acres of land situated in Desert Center, Riverside County, and for damages. Defendants cross-complained for specific performance and damages demanding delivery of a deed to the north 178.46 acres of the property and reimbursement of expenditures made on plaintiff's behalf. At trial defendants dropped their claim for damages.
 The trial court found that defendants were entitled to the *463 north portion (178.46 acres) of the property, and ordered plaintiff to execute a grant deed. It further awarded plaintiff judgment in the sum of $3,416.41.plaintiff appeals from the whole judgment.
 In July 1952, Lorraine Prouty Griffis, then known as Lorraine Prouty Hull, filed on 320 acres of desert lands under the Desert-Land Entries Act.  [fn. 1] This is the north half of section 13, township 5 south, range 15 east, Riverside County, California. During the period from 1953 through 1957, the plaintiff expended $704 on the land. Her proof of expenditures filed with the Federal Land Office showed $344 expended for 1955 and $360 for 1956.
 On January 10, 1958, plaintiff made application for a moratorium on her entry work.  [fn. 2] This statutory extension was granted until March 1, 1959, and thereafter plaintiff had until September 13, 1959, to complete her annual work on the entry, and commence work for final approval. In order to complete her work on the entry, the plaintiff was required to drill a well to develop sufficient water to irrigate the entry, install a pumping plant in the well, and to install such a pipeline as would be necessary to take water to each 40 acres of the entry, and to grow a 40-acre crop on the entry.
 In the summer of 1959, the defendant, F. Ronald Squire, contacted both plaintiff and a Mrs. Pauline Walsh, who also had an entry, about the possibility of doing something with their entries. The result of these negotiations was that defendants entered into farming lease agreements with both parties. They gave defendants the right to obtain title to all but 40 acres of Mrs. Walsh's property after title was obtained from *464 the United States, and the right to approximately 178 acres of plaintiff's property after she obtained title.
 The defendants in accordance with the terms of the agreements took possession of plaintiff's property and drilled a water well thereon, graded and levelled the property and cultivated a portion of it, spending on said operations in excess of $90,000. In March 1961, prior to the time this action was filed, there was a disagreement between the parties, and as a result thereof, a new "Farm Development Lease" was prepared, and defendants paid $2,025 as consideration for the execution of the new lease and in settlement of all claims and demands that plaintiff then had against defendants.
 Defendants then proceeded to perform the work necessary to obtain title to both parcels of property. Mrs. Walsh obtained her patent and upon obtaining it, notified defendants and completed her transaction with them by deeding the portion to which she agreed to "Franna Farms" partnership, at defendants' request. The partnership known as "Franna Farms" was composed of F. Ronald Squire, individually, F. Ronald Squire as trustee for others, and his mother, Anna Squire, also individually and as a trustee for others. Defendant Margaret Squire was never a member of "Franna Farms" and had no legal interest in it since it was her husband's separate property.plaintiff received her patent on December 17, 1962, recorded it, and testified that she immediately wrote defendants. Defendants deny receiving any such notice until they received a letter from plaintiff's attorney demanding a quitclaim.
 The 1961 lease called for certain farming each year during its term. However, at the time this lease was entered into a full discussion was had concerning the hazards of desert farming, and for that reason a provision was inserted in the lease whereby defendants agreed to pay liquidated damages in the minimum amount of $15 per acre for any areas not improved nor farmed as required by its terms. Thus, if defendants did not perform the required farming, they would be required to pay this amount.
 Defendants performed this required farming the first year, but found it not possible to develop a marketable crop upon the land. Thus having planted all necessary crops for titling the land,  [fn. 3] and finding that it was only suitable for such permanent crops as grapes and citrus, they made no further effort to farm plaintiff's portion of the entry and decided to *465 admit their obligation to pay $15 per acre for liquidated damages, rather than waste money in an attempt to raise crops which could not be harvested and marketed and would have no commercial value. The damages, however, were never tendered nor paid inasmuch as plaintiff was obligated to defendants for monies expended on her behalf on her portion of the property pursuant to the terms of the lease.
 It was at this time that plaintiff claimed termination of defendants' rights under the agreement, claiming a default for failing to have farmed her property, and demanded possession. When defendants refused to quitclaim and vacate the premises, plaintiff brought the present action to quiet title and for damages. Defendants cross-complained demanding a delivery of the deed to the north 178 acres and for damages and reimbursement of expenditures made for plaintiff on her portion of the property pursuant to the lease. The claim for damages was abandoned at trial.
 The trial court found that the defendants had performed under the terms of their agreements, and that they were entitled to a deed to the north 178 acres, ordering plaintiff to execute such deed. It also awarded plaintiff rental or damages of $6,300 for the period her property was not farmed, less the offsetting claim of $2,883.60 made by defendants for improvements to plaintiff's portion of the property, or a total money judgment of $3,416.41.
 [1a] Plaintiff makes the following contentions on appeal: That the agreement upon which the judgment is based is illegal, void and wholly unenforceable because it was contrary to public policy; and the evidence upon which the findings and judgment of the trial court rests is insufficient as a matter of law.
 Plaintiff's first contention is subdivided into three distinct arguments. She contends that (a) an executory contract to convey all or part of an entry after the issuance of a patent to one who has assisted in the development work is illegal and void; (b) if the contract between the parties is construed as an assignment before the issuance of patent, it is equally unenforceable; and (c) it is plain from the record that this assignment was made to respondents only nominally and was in fact for the benefit of a partnership which was the real party in interest and as such, was illegal.
 [2] Although illegality of the agreement between the parties was not pleaded nor the issue even considered at trial, it is clearly settled that an appellate court may consider the *466 question for the first time on appeal. (See Lewis & Queen v. N. M. Ball Sons, 48 Cal.2d 141, 148 [308 P.2d 713]; Greene v. Brooks 235 Cal.App.2d 161, 168 [45 Cal.Rptr. 99].)
 [1b] Plaintiff relies chiefly upon 43 Code of Federal Regulations 232.17 and the case of Herbert C. Oakley, 34 Land Decisions 383 in urging that the agreement to transfer this acreage to defendants after title was obtained was violative of public policy and therefore unenforceable.
 43 Code of Federal Regulations 232.17, reads in part as follows:
 "The provisions of law authorizing the assignment of desert entries, in whole or in part, furnish no authority to a claimant under said law to make an executory contract to convey the land after the issuance of patent and thereafter to proceed with submission of final proof in furtherance of such contract. (34 L.D. 383.) The sale of land embraced in an entry at any time before final payment is made must be regarded as an assignment of the entry, and in such cases the person buying the land must show that he possesses all the qualifications required of an assignee. (29 L.D. 453.)"
 In the Oakley case, the Department of Interior expressly stated: "While absolute assignments of desert land entries are recognized as valid, it does not follow that the language of the act of March 3, 1891 (26 Stat. 1095), allowing such assignments, recognizes the right of the claimant to execute an executory contract to convey the land after the issuance of patent, and thereafter proceed with the submission of final proof in furtherance of his contract. The result of the recognition of such a right in the claimant is clearly manifest and the effect thereof might easily operate to nullify that provision of the act which declares that 'no person or association of persons shall hold, by assignment or otherwise, prior to the issuance of patent, more than three hundred and twenty acres of such arid or desert lands.'"
 "In the case of absolute assignments of such entries, the assignee assumes the position of an original entryman, so far as his qualification to take is concerned, and he being the person then charged with the submission of satisfactory proof of compliance with the law, is before the land department in his own right and all future trasactions [sic] respecting the entry are conducted directly with him. The land department in such case has before it the real party in interest and can deal with him personally. By the recognition of an executory contract to convey after patent, leaving only a nominal party in interest before the Department, who would be permitted to *467 submit proof of his own qualifications and compliance with the law, with no requirement as to proof of the right of the real beneficiary to take the land, a far different end may be accomplished, directly contrary to the spirit and intent of the desert land law. By proceeding under such contracts, any person or corporation might easily acquire a quantity of land greatly in excess of that allowed under the act."
 The Supreme Court followed this opinion of the United States Department of Interior in Eymann v. Wright, 177 Cal. 144 [169 P. 1037]: "Plaintiff's action was to recover against the defendants for violation of their contract with her, she being protected by an indemnity bond. The gravamen of the action is this: By their contract defendants made to plaintiff an executory assignment of their rights under desert land entries, agreeing to do all things necessary under such entries to perfect them and entitle defendants to patent for those lands, and on issuance of such patents the titles so granted to them were in turn to be conveyed to plaintiff. The complaint charged in several counts, but all to this effect. A general demurrer to it was interposed and sustained and from the judgment which followed plaintiff has appealed. In argument it is contended that the Desert Land Act expressly permits the entryman to assign his entry. This is true. Still further, it is argued that if such an executed assignment is valid, an executory agreement to assign is also valid, and that as fraud is never presumed, it will be held against demurrer that the contract was fair and legal. And, finally, it is argued that this court, in Sanders v. Dutcher, 168 Cal. 353 [143 P. 599], ... has given distinct recognition to contracts of this character. A reading of Sanders v. Dutcher will show that appellant is completely mistaken. The desert land entry in that case was made by Orpha C. Johnson. Her assignment to Sanders was an executed assignment and under it he appeared as claimant. Thereafter she made a similar sale and assignment to the defendant Dutcher, and it was over these two executed assignments that their controversy was waged. Such manifestly is not the situation here presented. Here the contract was that these defendants should do all things necessary to procure, and should procure, patents, title under which patents was by virtue of the agreement then to be transferred to plaintiff. The contract was in distinct violation of the decisions of the land department, from one of which it may be profitable to quote at length. In the case of Herbert C. Oakley, 34 Land Decisions, *468 page 383, the Secretary of the Interior thus speaks: ..." (Then follows the language set forth at p. 466 ante.)
 The opinion concludes with the following statement: "Without regard, then, to the fair or unfair dealing of the defendants, it is manifest that their contract was against the policy of the law (Civ. Code,  1667) and could not be carried out under the law."
 In their brief, defendants cite the case of Sanders v. Dutcher, 168 Cal. 353 [143 P. 599], as holding that "contracts made between an entryman and another to sell the land after the entryman gets his title, are not illegal." In Eymann, the court attempts to distinguish Sanders v. Dutcher, supra, and although the court was mistaken in its facts in stating that the entryman made two executed assignments, the controversy being between the two assignees, it properly disregarded Sanders as not being applicable and does point out the true basis for distinction. In Sanders, the entry, the final proof and payment had all been made by the entryman [Johnson] prior to the assignment of all her right, title and interest in the land to Dutcher, who entered into possession and spent large sums of money in the improvement of the property. Sanders contested the original entry upon the ground that final proof was fraudulently made because Johnson did not personally make reclamation of the land and also because final proof was made after and under the sale to Dutcher. The land department cancelled the entry and accepted Sanders' application as a claimant under the homestead law, and eventually held that Sanders was entitled to a patent. Thereafter, Sanders filed suit in ejectment to recover possession and to quiet his title. Dutcher cross-complained to have the legal title conveyed to him as equitable owner. Sanders' motion for judgment upon the pleadings was granted but the judgment entered for Sanders was reversed on appeal. The court held that Dutcher was entitled to receive title because a desert land entry is assignable and an agreement by the entryman to sell the land to Dutcher after title was obtained from the United States, did not invalidate the entry. The court also found that cancellation of the entry was secured by the fraudulent contrivance of Sanders and a third party.
 Admittedly, these two cases appear to be conflicting, but we believe the true distinction is that in Eymann we have a contract entered into before all proof and work had been completed by the entryman, whereas, in Sanders every requirement had been completed to acquire a patent. In other words, *469 in Sanders, the court considered these circumstances to be practically the same as a sale after patent is obtained, which is perfectly proper. In any event, Eymann is the latest decision of our Supreme Court; it disregarded Sanders, an earlier case; and it is binding upon this court.
 Botwin v. Wise, 46 Cal.App. 465 [189 P. 312], is another California case cited by defendants as supporting their contention of validity of this agreement. This appellate decision appears to ignore completely the holding of the Supreme Court in upholding the validity of an executory assignment of a homestead claim.
 A few cases in other jurisdictions are also cited which either conflict with Eymann or are distinguishable upon their facts. We are not persuaded that they are precedent to be followed by us.
 The most persuasive reason for holding these agreements to be contrary to public policy is found in the express language of the Desert Land Act: "... no person or association of persons shall hold by assignment or otherwise prior to the issue of patent, more than three hundred and twenty acres of such arid or desert lands. ..." (43 U.S.C.A.  329.) To hold otherwise would permit evasion of the acreage limitation indicated and allow individuals through executory assignments to acquire large holdings of government land.
 It seems clear that the assignment to defendants prior to issuance of a patent to plaintiff was equally proscribed by the moratorium legislation of 1956, under which plaintiff applied for and received an extension of time to complete her entry work. This legislation is found in 43 U.S.C.  336a et seq.; section 43 U.S.C.  336c reads as follows: "Notwithstanding any other provision of the desert land laws, the property right prior to issuance of patent to the lands in his desert land entry of an entryman who elects to suspend cultivation and improvement operations in accordance with section 336a of this title and of an entryman whose entry is allowed in accordance with section 336b of this title shall be a personal right, inheritable but not assignable."
 In U. S. Congressional and Legislative News, 84th Congress, Second Session 1956 (Vol. 2) the legislative history of the instant moratorium provision appears. Specifically at p. 3669, the departmental report of the Department of the Interior on the proposed legislation reads as follows: "In return for the privileges extended by H.R. 9953 the entryman benefitted would grant the United States and its permittees, *470 licensees, and lessees, the right to use the lands in their entries and would surrender any right of assignment they may have. The first of these provisions would insure the productive use of the lands is being made during the period of suspension of the entries, with the revenues of such inuring to the United States rather than the entryman. The second would prevent speculation and is very desirable. The entryman and his heirs would have to prove up. They could not sell their rights to a third party."
 Our conclusion that these agreements violated public policy and therefore were invalid makes it unnecessary to consider plaintiff's other contentions of illegality.
 It is true, as stated by plaintiff, that as a general rule courts will not enforce an illegal contract or lend their assistance to a party who seeks compensation for an illegal act. (Lewis & Queen v. N. M. Ball Sons, supra, 48 Cal.2d 141, 150.) The reason behind this rule is that equitable consideration of possible injustice between the parties, or unjust enrichment, are outweighed by the importance of discouraging prohibited transactions.
 The language of our Supreme Court in Tri-Q, Inc. v. Sta-Hi Corp., 63 Cal.2d 199 at pp. 218-219 [45 Cal.Rptr. 878, 404 P.2d 486], is particularly appropriate to the facts of the case at bench: "There is no doubt that the general rule requires the courts to withhold relief under the terms of an illegal contract or agreement which is violative of public policy. (Moore v. Moore, supra, 130 Cal. 110 [62 P. 294, 80 Am.St. Rep. 78]; Wise v. Radis, 74 Cal.App. 765, 775-776 [242 P. 90].) It is also true that whatever the state of the pleadings, 'when the evidence shows that ... [a party] in substance seeks to enforce an illegal contract or recover compensation for an illegal act, the court has both the power and duty to ascertain the true facts in order that it may not unwittingly lend its assistance to the consummation or encouragement of what public policy forbids.' (Lewis & Queen v. N. M. Ball Sons, 48 Cal.2d 141, 147-148 [308 P.2d 713].) These rules are intended to prevent the guilty party from reaping the benefit of his wrongful conduct, or to protect the public from the future consequences of an illegal contract. They do not necessarily apply to both parties to the agreement unless both are truly in pari delicto. In Norwood v. Judd, 93 Cal.App.2d 276, it was said (at pp. 288-289 [209 P.2d 24]): 'The rule that the courts will not lend their aid to the enforcement of an illegal agreement or one against public policy is fundamentally *471 sound. The rule was conceived for the purposes of protecting the public and the courts from imposition. It is a rule predicated upon sound public policy. But the courts should not be so enamored with the Latin phrase "in pari delicto" that they blindly extend the rule to every case where illegality appears somewhere in the transaction. The fundamental purpose of the rule must always be kept in mind, and the realities of the situation must be considered. Where, by applying the rule, the public cannot be protected because the transaction has been completed, where no serious moral turpitude is involved, where the defendant is the one guilty of the greatest moral fault, and where to apply the rule will be to permit the defendant to be unjustly enriched at the expense of the plaintiff, the rule should not be applied.' "
 We cannot say in the case at bench that either party was guilty of the greater moral fault. The record discloses no such finding. Furthermore, the fact that these parties were in pari delicto is obvious from a reading of their agreement of August 15, 1959, in which they acknowledged the possibility that their contract might be held void in these words: "The parties understand and recite that while neither of them entertain any intent to circumvent any of the laws of the United States in the execution of this instrument that neither of them shall be liable to the other in any regard whatsoever should all or any part of this instrument be declared null and void by any court of competent jurisdiction." Therefore, we believe that the action of the trial court in enforcing this illegal agreement by awarding defendant title to the 178.46 acres cannot be upheld upon the theory that not to do so would result in plaintiff's unjust enrichment at defendants' expense. Undoubtedly, this is a harsh result, and we cannot help but deplore the fact that the issue of illegality was not raised in the trial court in order that some of the matters mentioned in the previously cited decisions might have been given due consideration by the trial judge.
 [3] However, upon retrial of this action, defendants will be able to derive considerable satisfaction from the recent case of Hainey v. Narigon, 247 Cal.App.2d 528 [55 Cal.Rptr. 638], which presents a factual situation very similar to the case at bench. There a nonveteran [Hainey] made an agreement with a veteran [Narigon] whereby the latter purchased in his name a home selected by Hainey under a Veterans' Administration loan. It was agreed that Narigon would have no interest in the property and that he would deliver a deed *472 to Hainey. Title was taken in Narigon's name, but Hainey made all the payments, including taxes and insurance. Hainey brought action against Narigon to impose a resulting trust and recovered judgment. This judgment was reversed upon the ground that the agreement was contrary to public policy. However, the appellate court made the following statement (at pp. 531-532) which suggests an equitable solution of the problem which will confront the trial court upon retrial: "Although plaintiff is not entitled to enforce the contract, this is not to say, in the factual context of this case, that he is not entitled to some consideration. In Tri-Q., Inc. v. Sta-Hi Corp., 63 Cal.2d 199 [45 Cal.Rptr. 878, 404 P.2d 486], the court (at p. 220) noted the importance of effective deterrence of contracts that were violative of public policy and at the same time indicated that the forfeiture resulting from unenforceability of such a contract should not be disproportionately harsh considering the nature of the illegality, and concluded with the statement from Lewis & Queen v. N. M. Ball Sons, 48 Cal.2d 141, 151 [308 P.2d 713], that: 'In each such case, how the aims of policy can best be achieved depends on the kind of illegality and the particular facts involved.' ..."
 "Looking at 'the particular facts involved,' it appears that a fair and equitable solution is to give plaintiff a lien on the property for the net amount of his financial investment in it, that is to say, the amount of the payment that he made in the initial acquisition of the property, the monthly payments that he has made, including interest, taxes, and insurance and any out-of-pocket expense in making permanent improvements, less the reasonable rental value of the property from the date plaintiff moved into it until the date of any new judgment that is entered herein in the trial court. Thus, plaintiff would be deprived of the benefit of his bargain, that is to say, the appreciation in value of the property over the years. Such a loss would no doubt serve as a deterrent to others who might conceive the idea of going into a similar deal. The forfeiture by plaintiff of the appreciation of the property would not appear to be disproportionately harsh considering the nature of his violation of public policy. Furthermore, to allow plaintiff to have the benefit of the appreciation in value of the property would be to give him an unearned profit on an invalid transaction."
 "Viewing the matter from the position of the defendants, the result is to prevent them from being unjustly enriched from the out-of-pocket money plaintiff has put into the property. However, this gives defendants the benefit of any appreciation *473 in the value of the property." (Italics added.)
 The term "permanent improvements" mentioned in the foregoing quotation merits some definition or interpretation. In 26 California Jurisprudence, 2d 189, under the title "Improvements," we find a discussion of the law dealing with "improvements in the technical sense of permanent annexations of personal property to real property or beneficial alterations of realty. ..." At page 191, section 2, "Definition," appears this statement which seems to be applicable to the facts of the case at bench: "The word 'improvements,' in the sense here intended, may be described as applying to constructive alterations of, or additions to, realty, which are more extensive than ordinary repairs and which enhance to a substantial degree the value of the property ... According to this concept of the term, numerous and varied additions and alterations have been designated as improvements, including ... the erection of a fence, the planting of grain, vegetables, or an orchard, the installation of pumps and equipment for the development of a water supply, ... the construction of a well or of an irrigation system on agricultural land, the clearing of land of scrub oak and other wild growth and grading for cultivation, and the construction of a ... ditch or canal for irrigation. ..."
 Upon retrial, it will be incumbent upon the trial court in applying the formula of Hainey v. Narigon, supra, 247 Cal.App.2d 528, to determine what moneys were expended by defendants in making permanent improvements to the 320 acres of land, obtained by plaintiff under patent, and also what taxes and insurance, if any, were paid by defendants during their possession. The total of these expenditures would be the amount of the lien to which defendants are entitled under the Hainey formula.
 In view of our conclusion that the agreements are illegal and invalid and, therefore, cannot be specifically enforced, we deem any further consideration of the points raised in this appeal to be unnecessary.
 The judgment is reversed.
 McCabe, P. J., and Kerrigan, J., concurred.
NOTES
[fn. *]  *. Assigned by the Chairman of the Judicial Council.
[fn. 1]  1. This act is found in 43 U.S.C.  321 et seq. It states that desert lands that are part of the public domain are open to settlement by citizens or those who have filed a declaration of intention to become citizens. On payment of 25 cents per acre, an eligible person files with the registrar of the land district where the desert land is located an affidavit that he intends to reclaim a tract of desert land not exceeding 320 acres by conducting water onto the land within three years. On payment of the additional sum of one dollar per acre at any time within three years after filing his declaration a patent may be issued to him. This right is restricted to surveyed lands. In order to be eligible to receive a patent an applicant must show expenditures for necessary irrigation, reclamation, and cultivation of the land, and in permanent improvements, or in the purchase of water rights for irrigation, amounting to at least $3 per acre for the whole tract. He must show expenditures of not less than one dollar per acre for each of the three years, verifying this by affidavit of two or more witnesses. An applicant must further cultivate one-eighth of the land.
[fn. 2]  2. On or about July 30, 1956, the United States passed moratorium legislation (43 U.S.C.  336(a)(b)) which, on application by an entryman, suspended further operations through March 1, 1959.
[fn. 3]  3. 43 U.S.C.  328--40 acres, 1/8 of the land.
