That the object to be attained by the agreement between Flickinger and Smith on the one hand, and the defendant (Shaw) on the other, was to acquire by purchase a right of way over the land of the latter for the ditch constructed by the first-named parties is, in our judgment, a fair legal deduction from the facts disclosed in this case. Flickinger and Smith were seeking to acquire something more than a mere license or authority to do a particular act or series of acts on another's land without possessing any estate therein (Potter v. Mercer, 53 Cal. 673), and which right might at any time be revoked by the licensor.
In this case, the agreement between the parties is, in substance, that Shaw gives the right of way for a ditch over his land; that Flickinger and Smith survey and excavate the ditch, and keep it in repair, and the ditch, when completed, to be used for the benefit of all the contracting parties in irrigating their respective tracts of land. Let it be observed (and it is so found) that Shaw agreed that Flickinger and Smith should have a conveyance of and give a right of way over his land for the ditch, and one half of the water to be diverted thereby.
The above facts clothe the transaction with the character of a purchase by one party, and sale by the other, of a right of way for a ditch. The license under which *131Flickinger and Smith entered was vested in them by a contract of purchase for a valuable consideration.
Under this agreement, Flickinger and Smith did survey and construct the ditch and kept it in repair, and both parties made use of it for the purpose for which it was constructed, viz., the irrigation of their lands. Thus the agreement between the parties was executed. The license here given to Flickinger and Smith -was one for the acquisition of an interest in land by purchase of Shaw, for which they paid by doing what they had agreed to do. After the ditch was constructed, it was used by all parties under the agreement for four or five years.
Now, it would be highly inequitable, after the work has been done and money expended by Flickinger and Smith, to allow Shaw to recall his consent, fill the ditch, and cut Flickinger, who has succeeded to all the rights of Smith under the agreement above stated, off from the use of the ditch and the water flowing therein; nor should any such proceeding, in our view, be upheld by a court of justice.
In Rerick v. Kern, 14 Serg. & R. 271, 16 Am. Dec. 497, a case in some respects similar to the one under consideration, came before the supreme court of Pennsylvania. The case was one concerning the legal effect of an executed license. It was an action on the case to recover damages for diverting a watercourse, by which the plaintiff lost the use of his saw-mill. The facts were as follows: Kern, the plaintiff below, being about to erect a saw-mill on a stream designated as the right-hand stream, a better seat for the mill was found by his mill-wright, on what was termed the left-hand stream. Kern thereupon applied to Berick for permission to turn the water of the other stream into the left-hand stream, which was granted. In consequence of this permission, Kern built the mill on the left-hand stream. The mill was rendered a third more valuable by the union of the two streams than it *132would have been with the right-hand stream alone. No deed was executed, nor was any consideration given, but Kern, in consequence of the permission given by Keriek, built a very good mill, which did a great deal of business, and which he would not have built on the left-hand stream if the permission had not been given.
In this case, as will be observed, there was no element of purchase.
The defense set up was, that the permission to Kern was a mere license which was revocable under all- circumstances and at any time. To this it was said, in the unanimous opinion of the court, by Gibson, J.: “But a license may become an agreement on valuable consideration, as where the employment of it must necessarily be preceded by the expenditure of money; and when the grantee has made improvements or invested capital in consequence of it, he has become a purchaser for a valuable consideration. Such a grant is a direct encouragement to expend money, and it would be against all conscience to annul it ,as soon as the benefit expected from the expenditure is beginning to be perceived. Why should not such an agreement be decreed in specie? That a party should be let off from his contract, on payment of a compensation in damages, is consistent with no system of morals but the common law, which was in this respect originally determined by political considerations, the policy of its military tenures requiring that the services to be rendered by the tenant to his feudal superior should not be prevented by want of personal independence. Hence the judgment of a court of law operated on the right of a party, and the decree of a court of equity on the person. But the reason of this distinction has long ceased, and equity will execute every agreement for the breach of which damages may be recovered, where an action for damages would be an inadequate remedy.”
*133The same rule has been applied in case of an executed license in Pope v. Henry, 24 Vt. 565, and also in in Swartz v. Swartz, 4 Pa. St. 358; 45 Am. Dec. 697.
The principle on which these cases proceed is, as was said in Swartz v. Swartz, 4 Pa. St. 358, 45 Am. Dec. 697, "that the revocation would be a fraud; and that to prevent it a chancellor would turn the owner of the soil into a trustee ex maleficio.” The case under consideration presents a stronger ground of relief then either of these above cited.
Principle and authority, in our judgment, show that the plaintiff has rights here which should be protected by injunction. The facts show plaintiff’s right to a specific performance. The statute of frauds is not in the way. There has been part performance, and possession under the agreement, as far as the plaintiff could obtain possession, and though the agreement rests in parol, under the circumstances above mentioned, a party is entitled to a specific performance. (Rerick v. Kern, 14 Serg. & R. 272; 16 Am. Dec. 497.). To refuse specific performance under the circumstances would be to sanction fraud, and to allow a statute passed for the prevention of frauds to become the means of accomplishing a fraud.
To complete the purchase, nothing remains to be done except the execution of a conveyance of the right of way and a proper proportion of the water to Flickinger. His equity to a deed is perfect (Morrison v. Wilson, 13 Cal. 494; 73 Am. Dec. 593); and when such is the case, a court of equity, in accordance with its familiar rules considering that as done which ought to be done, will protect it as readily and as fully as a legal title. If the legal title would be protected by an injunction, a perfect equitable title should also.
In conformity with these views, in our opinion the judgment should he affirmed.
*134Beatty, C. J., Fox, J., and Paterson, J., concurred.
McFarland, J., dissented.
Rehearing denied.