THURMAN, J.
On the 31st day of March, 1910, at Burtner, Millard County, this state, plaintiff and defendant entered into a written agreement in words and figures as follows:
“ This memorandum witnesseth that John W. Coburn agrees to purchase at the price of ($1,600) sixteen hundred dollars, the following described real estate situated in the county of Millard, state of Utah, to wit: The S. E. ^4 of the S. W. % of See. 6, T. 17 S., R. 6 W., S. L. M., and Vern Bartholomew agrees to sell said premises at said price and to convey to John W. Coburn, said purchaser, a good title thereon, subject to final proof and (25) twenty-five shares of water in the Mel*568ville Irrigation Company. Said land is desert land, and before final proof can be made said land will have to be irrigated, and said Coburn agrees to irrigate said land so proof can be made. And pending this proof Y. Bartholomew agrees to have a water certificate made in the name of John W. Coburn and place in the State Bank of Millard County at Fillmore as security for the money paid, and when final proof is made Bartholomew agrees to make a deed and place in the bank in escrow with the water stock before second payment is made. These payments upon said land are to be made as follows: ($800) eight hundred dollars down, the receipt of which is hereby acknowledged, ($400) four hundred dollars in one year from date, and ($400) four hundred dollars in two years from date at 7 per cent, interest on deferred payments, interest payable annually.”
In pursuance of said agreement plaintiff paid the defendant the said sum of $800, and the defendant caused a certificate of stock in the Melville Irrigation Company, a corporation, to be made in the name of the plaintiff, and placed the same in the bank referred to in the agreement. Plaintiff after-' wards, during the month of May, 1910, entered into possession of said land and irrigated the same, and during the year 1910 was compelled to pay, and did pay, $100 as an assessment levied on said stock. In September of the same year defendant made and filed in the General Land Office of the United States his final proof for patent for said land to the effect that he had complied with the laws of the United States and the regulations of the land department in all respects relating to desert land entries, and at the same time, as part of said final proof, made affidavit to the effect that he was the sole owner of said land, and that no other person possessed any interest therein. Defendant afterwards filed in said land office another affidavit in which he stated that in March, 1910, he had sold to plaintiff a portion of said land, and had also sold another portion of said entry to one Selman. The defendant’s application for patent was suspended, and he thereupon relinquished the same. Shortly afterwards his wife, Emma Bartholomew, entered the same tract of land and was in pos*569session thereof at the date of the trial. At the time the written agreement was entered into, as before stated, defendant was in possession of said land under a desert land entry made in 1906, and as far as the evidence discloses, at the time said written agreement was entered into said entry was in good standing. After the failure of defendant’s application for patent and his relinquishment thereof and entry by his wife, Emma Bartholomew, plaintiff demanded of defendant that he return to plaintiff the $800 paid defendant at the date of said written agreement, and interest thereon, and also demanded the said sum of $100 paid by plaintiff as assessment on said water stock. The defendant refused to pay the same or any part thereof. The foregoing, in substance, are the material facts found by the court, and likewise the material matters covered by the pleadings. Both the complaint and the answer contain other allegations, but in view of the findings of the court and the assignment of errors they are immaterial. The case was tried to the court without a jury, and judgment rendered for plaintiff for the sum of $900. Defendant appeals.
At the beginning of the trial, and before any evidence was introduced, defendant moved for judgment on the pleadings, which motion was overruled. That ruling of the court constitutes appellant’s first assignment of error. He also assigns as error the judgment rendered by the court because, as defendant contends, the sums awarded by the court were paid by plaintiff for the purchase of the water stock and for the assessment thereon. It is also assigned as error that the judgment is contrary to law. These assignments constitute the issues presented by this appeal.
Under the first assignment of error, and by his brief filed herein, appellant contends that the court erred in overruling his motion for judgment on the pleadings for the reason, as he says, "the complaint showed on its face that it did not state facts which, if proved, would entitle the plaintiff to judgment against the defendant.” The reasons assigned by appellant for this contention are:
"The complaint showed a contract entered into which was contrary to law and could not be enforced, and sought to recover damages for its breach.”
*5701 In support of Ms position appellant relies upon section 2 of the act of Congress published in 35 Stat. L. U. S. p. 52 (U. S. Comp. St. 1916, section 4682), which reads as follows:
‘ ‘ That from and after the date of the passage of this act no assignment of an entry made under said acts shall be allowed or recognized, except it be to an indi-vidual who is shown to be qualified to make entry under said act, of the land covered by the assigned entry, and such assignments may include all or part of an entry; but no assignment to or for the benefit of any corporation or association shall be authorized or recognized. ’ ’
2, 3 It is quite manifest to the court that the section of the statute just quoted has no application to the facts of this case. That section was evidently intended to meet a case where an entryman assigned all or a part of Ms entry to an individual upon the understanding or expectation that the assignee would, in his own name, make final proof for patent. In that case, in order to guard against fraud and the issuance of patent to one not entitled thereto, the law requires that before such assignment will be allowed or recognized it must be shown that the assignee is qualified to make a desert entry. Whether the assignment itself should on its face show such qualification, or whether the fact may be shown by evidence aliunde, need not be determined in this proceeding, for, as before stated, the law has no application to a case of this kind. The written agreement in this case is not an assignment of the land in question. At most it is only an agreement, on certain conditions, to convey the land in the future. We are unable to see wherein the agreement in question contravenes either the letter or the spirit of the law above quoted and relied on by appellant. TMs question is raised by defendant on a motion for judgment on the pleadings. Such a motion is not usual on the part of a defendant unless it be where a defendant’s counterclaim is either admitted or not denied, in which case his relation to the question is that of a plaintiff. A motion for judgment on the pleadings is essentially a proceeding on the part of a plaintiff. 23 Cyc. *571769. But waiving tbe propriety of technical procedure the motion may be treated as a general demurrer and be governed by the rules applicable thereto in determining the effect of appellant’s motion. We have not set out the complaint in ' hsee verba for the reason that the only point made against it arises on the face of the written agreement which we have quoted at length at the beginning of this opinion. The question therefore is: does the agreement show on its face anything contrary to law from which it can be concluded that the complaint does not state a cause of action, or that plaintiff is not entitled to any relief because of the illegality of the transaction ? Unless it appears on the face of the agreement, or somewhere else in the complaint, that plaintiff is not qualified to make a desert entry, we cannot conceive how a general demurrer on the ground of illegality in the transaction can be sustained. In the case at bar we feel justified in holding that the trial court did not err in denying appellant’s motion, hence the first assignment should fail.
4 As to the second assignment of error the case, if possible, is more clear that the judgment of the trial court was right. Under this assignment appellant contends that, so far as the water stock is concerned, plaintiff purchased it outright for the sum of $800; that the stock thereby became his; and that the payment of the $100 assessment was for the protection of his own stock, as to which appellant had no concern. This position is so utterly untenable from every point of view1 that its deliberate assertion, if not absolutely astounding, is, at least, a matter of surprise. Appellant, as will be seen, entered into an agreement to sell respondent the land in question, subject to acquiring title from the government. By the same instrument he agreed to convey to plaintiff a water right for the land, all for the sum of $1,600, $800 of which was to be paid at the time the agreement was made and the remainder later. Pending the final proof for patent defendant was to place the water stock in the bank agreed upon in the plaintiff’s name as security for the money paid. Without any fault of . plaintiff, but by the default of defendant himself, defendant failed in his final proof for patent. He could not, therefore, *572convey to plaintiff, and the agreement failed of complete consummation. Plaintiff seeks return of the money paid for the payment of which the water stock in escrow became a mere security under the express agreement of the parties. There is no merit in this assignment.
The third and last assignment has already been disposed of, and need not be further considered.
Respondent has cited many authorities relating to the effect of illegal transactions between parties where one party is less culpable than the other, but the view we have taken of the transaction between plaintiff and defendant in the present case renders it unnecessary to review the authorities so cited, as they are not pertinent to our view of the case.
5, 6 The judgment of the trial court as to the amount to which the plaintiff is entitled is right, but this court is powerless to affirm the judgment without remanding the cause to the trial court for further proceedings. Plaintiff, in his case, did not adopt the proper form of action. The action should have been for a foreclosure, because the obligation, as we have seen, by express agreement, is secured by property standing in tho plaintiff’s name in escrow in the Fillmore bank. To affirm this judgment without requiring the plaintiff to first proceed against the fund or property set apart for that purpose, especially as it stands in plaintiff’s name, would be to give plaintiff an unfair advantage and probably lead to,further litigation in order to determine the rights of the parties. This question has given us more concern than any other question in the case. Comp. Laws 1907, section 3498, in part, provides as follows:
“There can be but one action for the recovery of any debt or the enforcement of any right secured by mortgage upon real estate or personal property, which action must be in accordance with the provisions of this chapter,” etc.
The section then provides for a sale of the mortgaged property according to the provisions of law relating to sales on execution. Respondent’s contention that he was not, in this ease, compelled to foreclose his lien upon the water stock is in contravention, not only of the express language of the statute *573we have quoted, but the decisions of this court heretofore rendered. Bacon v. Raybould, 4 Utah, 357, 10 Pac. 481, 11 Pac. 510; Boucofski v. Jacobsen, 36 Utah, 165, 104 Pac. 117, 26 L. R. A. (N. S.) 898. Inasmuch, however, as this case has been tried in its present form without objection and judgment rendered, which, as to amount, in the opinion of this court, is just and equitable, it is the opinion of the court that the ease should be disposed of with as little expense and inconvenience as possible, at the same time safeguarding the rights of both parties to the action. The cause is therefore remanded to the trial court, with directions to recast the pleadings and make findings of fact and conclusions of law in accordance with the views herein expressed, and enter a decree of foreclosure in favor of the plaintiff for the amount of the judgment found by the trial court, and for a deficiency judgment as provided by law in eases of foreclosure. Neither party to recover costs on appeal.
ERICK, C. J., and McCARTY, CORPMAN, and GIDEON, JJ., concur.