By the complaint in this case, the plaintiff seeks to charge the defendant as trustee of the legal title to a tract of land in Alameda County, known and described as the north half of the southeast quarter of section seven, township three south, range three west, Mount Diablo meridian. A demurrer to the complaint was sustained by the Court below, the plaintiff declined to amend, and, final judgment having been entered against him, he appeals.
Originally, as it appears from the complaint, the land formed a part of several leagues of land embraced within the exterior boundaries of a Mexican grant named Las Pocitas; and it stood in that position until June 6, 1871, when it was excluded from the grant by the confirmation of the final survey of the ranch.
On July 1, 1871, the Surveyor General of the United States for the State of California, having surveyed in the field the township within which the land was located, and sectionized and subdivided it, and constructed his survey into and upon a township plat, filed a duplicate of the township plat in the local land office in the district of San Francisco, within which the land was located; and the defendant, who was then and had been in possession of the land, residing upon and claiming it as a pre-emptioner, presented and filed in the local Land Office his declaratory statement of his intention to pre-empt the land under the pre-emption laws of the United States. Thereafter, and within three months after the township plat had been filed, the plaintiff, who also claimed the land as a purchaser from the State of California, presented and filed in the same office a claim to have the land certified over to the State for his benefit, pursuant to an Act of Congress entitled, “An Act to quiet land titles in California,” approved July 23, 1866.
Upon these hostile and opposing claims a contest arose, before the officers of the Land Department of the United States, which was heard by the Commissioner of the General Land Office, and determined adversely to the plaintiff; and *544the decision, on appeal, was affirmed by the Secretary of the Interior. By the decision the claim of the plaintiff was rejected; and, instead of certifying the land over to the State of California for his benefit, as, under the Act of July 23, 1866, the plaintiff claims the Commissioner and Secretary of the Interior were bound to do, they, in alleged violation of the provisions of that Act, awarded the land to the defendant under the pre-emption laws of the United States, and made an order permitting him to enter it under his preemption claim, and, upon his entry and payment of the purchase price of the land, caused to be issued and delivered to him a patent therefor on the fifteenth of August, 1876.
The plaintiff alleges that this decision was contrary to law, because he proved, in the investigation of the contest, to the satisfaction of the Commissioner of the General Land Office, and the Commissioner found, that, in the year 1863, the State of California, by its locating agent, selected and located the land in dispute in part satisfaction of the grant by the United States to said State of the sixteenth and thirty-sixth sections of land, in each township in said State, under an Act of Congress entitled “An Act to provide for the survey of the public lands in California, the granting of pre-emption rights therein, and for other purposes,” approved March 3, 1853; and also in lieu of, and as indemnity for, certain of said sixteenth and thirty-sixth sections of lands in the State, or portions thereof, which had become lost to the State, under the terms and conditions of the Act of Congress; that the State, after it had so selected and located the land, sold and disposed of the same 'to the grantors of the plaintiff on the seventeenth of February, 1864, to whom, on payment of the purchase price “pursuant to the law of the State,” the Register of the State Land Office issued and delivered a certificate of purchase, under and by virtue of which the purchasers entered into possession of the land and continued in possession until September 24,1870, when the defendant intruded upon their possession, and from that date has continued in the undisturbed possession of the same. But the plaintiff, and those under whom he claims, “ some time in 1866,” presented to the Register and officers of the local Land Office of the United States the State selection and lo*545cation and their claim of title thereunder; and the same was, by the Register, noted and entered in writing upon the tract-book of the local Land Office, and upon the tract-books of the general Land Office of the United States, at Washington, whereby the officers of the Land Department had notice of "the equitable rights of the plaintiff.
Upon these proofs and findings, the plaintiff claims that the land should have been certified over to the State for his benefit; and that he is now entitled to the patent, which, upon the erroneous decision of the Commissioner and Secretary of the Interior, has come into the hands of the defendant.
There is no doubt that where the party has obtained from the United States a patent to a tract of public land, which, in equity and good conscience, and by the laws which Congress has passed on the subject, ought, upon a true construction of those laws, to go to another who establishes a prior right to it, that a Court of equity will control the patent in favor of the prior equity, and compel a conveyance of it to the owner of the equity. (Johnson v. Towsley, 13 Wall. 72; Silver v. Ladd, 7 id. 228; Garland v. Wynn, 20 How. 6; Lindsey v. Hawes, 2 Black. 554). But to entitle the claimant of a patent issued to another to equitable relief, he must show such a right to the premises described in the patent as, in equity and good consciencé, and according to the laws of Congress upon which he relies, entitles him to the patent. Coming into a Court of equity, asking for the interference of equity, he must not only show an equitable right to relief, but he must offer to do equity. He must show a reason valid in conscience, as well as an equitable title enforceable in a Court of chancery.
How it will be observed, that the basis of the claim asserted by the plaintiff rests upon the Act of Congress passed July 23, 1866. By that Act Congress undertook to confirm to the State all selections of any portion of the public domain, made by her in part satisfaction of any congressional grant, and which she had disposed of to purchasers in good faith under her laws. Certain lands were excepted from such confirmation, among which were lands covered by a Mexican or Span*546ish grant at the time of the selection. But if such lands were afterwards excluded from the grant, and became part of the public domain of the United States, they were made subject to the selection and to confirmation when the United States surveys were extended over them. (Huff v. Doyle, 93 U. S. 558.) To this last class of lands the land in dispute belonged. It was not surveyed by the United States until 1871, and the official plat of the survey was not filed in the proper Land Office until the twenty-eighth of June, 1871. On that day the land became and was part of the public domain of the United States, and, for the first time, it was open for settlement as other public lands of the United States, to the plaintiff, claiming as a purchaser under the State laws under the Act of Congress, or to the defendant, who was then in possession of it, claiming the right to pre-empt it under the pre-emption laws. (Rich v. Maples, 33 Cal. 109; Mahoney v. Van Winkle, id. 448; Newhall v. Sanger, 92 U. S. 762.) When it became public land, the claims to it of both the plaintiff and defendant depended upon the respective congressional enactments under which they were presented to the Land Office. Neither of the parties acquired any equitable right to the land by the mere assertion of his claim. It was necessary for each to establish his right by making the proof required by the law under which he asserted it; and by showing a compliance with its terms and conditions.
Originating, as did the right of the defendant, in the possession which he had of the land at the date of the filing of the official plat, his settlement gave him the status of preemptioner under the pre-emption laws. At the same time the Act of Congress of July 23, 1866, extended to a purchaser in good faith from the State, whose right originated in selection and location under the State laws, the same preemption rights. Both tona fide purchasers from the State and pre-emption claimants under the United States were placed by the Act on the same footing as to the acquisition of title. The object of the Act, as has been said by our predecessors in Toland v. Mandell, 38 Cal. 30, “ was to -legalize the possession of locators upon unsurveyed lands until they have opportunity to present their claims for determination by the officers of the United States, as provided by the Act, *547and to enable them to maintain actions in the Courts in relation to it.” (Foscalina v. Doyle, 47 Id. 437.) As residence and cultivation precede entry by a pre-emptioner, under the pre-emption laws, so selection and location upon public lands are necessary to the claim of a bona fide purchaser from the State under the Act; cultivable lands belonging to the State are grantable only to actual settler. (Johnson v. Squires, 55 Id. 108.) The plaintiff admits that the State’s selection was void, and that by it alone he acquired no right. He has, therefore, no equitable right to the land, unless the alleged selection and location have been recognized and ratified by the provisions of the Act of 1866, and he has shown such a compliance with its terms and conditions as entitled him to the benefit of the Act.
That Act undertook to confirm selections made by the State upon two classes of land: 1. Lands which had been surveyed by the authority of the United States; and, 2. Lands which had not been so surveyed. Section 2 provides, as a condition precedent to confirmation of selections upon surveyed lands, for a notice of such selection to be given by the “ proper State authorities” to the Register of the United States Land Office. The law made the selection when this notice was given; and upon being given, it became the duty of the Register to investigate and determine the claim, and if found to be for land to which the State would be entitled by the grant under which the claim of selection is made, the proper officer of the United States Land Office was authorized to certify it over to the State, if the State had not already received the quantity of land that she was entitled to, under her grant, as provided by Sections 1 and 2 of the Act.
But if selections had been made upon unsurveyed lands, such selections, when surveyed, and marked off and designated in the field, gave, according to the provisions of Section 3 of the Act, to a purchaser in good faith under the laws of the State, the pre-emption rights of a settler on the unsurveyed lands; and upon the filing of the township plat in the proper local Land Office, the State claimant was allowed the same time as a pre-emptor to present and prove up his purchase and claim under the Act.
How, the alleged selection must have been made on sur*548veyed or unsurveyed land. If made on unsurveyed land, the complaint of the plaintiff fails to show that the “proper authorities of the State" had notified the Register of the proper Land Office of the selection; and neither that officer nor any other officer of the Land Office, was hound by the Act to certify the land oyer to the State. The complaint is also uncertain as to whether the claim of the plaintiff is asserted upon a selection made on surveyed or unsurveyed land; for while the complaint contains averments which show that, at the date of the selection, the land had been surveyed in the field by the proper officer, and that a record of the survey and plat thereof was made and filed, but was afterwards withdrawn, it also shows that the land did not become part of- the public domain until it was excluded from the Mexican grant, within the exterior limits of which it was at the time of the alleged survey, and it was not subject to selection under the Act of Congress until the filing of the official plat.
Besides, whether the land was surveyed or unsurveyed, it was necessary for the complaint to show by proper averments that the plaintiff, in the assertion of his claim to the land proved that he had purchased it in good faith from the State;, that it had been selected and located under the laws of the State as part of the surveyed or unsurveyed lands of the United States, which were subject to be so selected; and that he had complied with the terms and conditions of the Act of Congress which ratified the selection. (The Secretary v. McGarrahan, 9 Wall. 298.) These constituted the elements of his asserted equitable right. But upon all of them the complaint is uncertain and insufficient. It is not alleged, nor does the plaintiff claim, that he purchased the land directly from the State, or that he ever located on it, or occupied or improved it, or paid or contracted to pay the State for it. On the contrary, it is alleged that the land was purchased from the State by his grantor or grantors, to whom, after making a payment, pursuant to the laws of the State, which required a payment of twenty per cent of the purchase, a certificate of purchase was issued, under which they occupied the land until 1870, when they were dispossessed by the defendant, who has ever since continued in the unques*549tioned and undisturbed possession of the land. And, except so far as it may appear from the averments of the legal conclusions that they were bona fide purchasers under the law of the State, and that a certificate of purchase was issued to him, it does not appear, from any allegations in the complaint, that they had complied with the laws of the State so as to constitute them bona fide purchasers from the State. It might be that the authorities of the State had refused to notify the Begister of the Land Office of the selection of the land, as they were bound to do by the second section of the Act of Congress, just because the alleged purchasers had not complied with the State laws; and non constat Gnat the State would have conveyed to them the land if it had been selected. Averments of legal conclusions in a pleading do not obviate the necessity for a statement of the facts which are essential to constitute a right claimed under a statute. It is true, that under the laws of the State the certificate of purchase was made evidence of the legal'title; but having been issued for land which was not public land, and had not been surveyed by the United States, the certificate was void. (Young v. Shinn, 48 Cal. 26.) Being void, it was not in itself evidence of that location on the land, and that purchase of it from the State and payment for it which would constitute them bona fide purchasers.
To constitute them such, as against the patentee of the United States, to whose title they assert a better right, it would be necessary for them to allege in their pleading that in the contest for the land before the Land Department they not only produced their certificate of purchase, but they also proved, and there was “ found” the performance of the series of acts required by law to entitle them to the certificate and the steps which had been taken to complete the purchase from the State, so as to entitle them to a patent from the State. (Laughlin v. McGarvey, 50 Cal. 169; Cadierque v. Duran, 49 Id. 356; The Secretary v. McGarrahan, supra.) Unless these things were proved and “found” they would fail to show in themselves that better right in favor of which a Court of equity would interpose to control the right of the patentee; and one who claims simply, and by no other right *550than, as assignee of their void certificate of purchase, is in no better position.
Moreover, it does not appear by any allegation in the complaint when the assignment of the certificate of purchase was made—whether before or after the contest before the Land Department—nor is it alleged that it was proved or found that the plaintiff was the owner and holder of the certificate, or a bona fide purchaser of the land in good faith and for a valuable consideration from the State.
He filed the complaint in this case in April, 1878, and all that he alleges on that subject is “ that he fis now the owner and holder of the certificate of purchase.” Inferentially, therefore, he did not become the owner and holder of it until after the decision of the Land Department. If he purchased after that, he bought with notice of the possession of the defendant, of the judgment in his favor, and of the issuance of the patent; and as a purchaser of the certificate from the alleged original purchasers from the State, with notice of those things, he is not a bona fide purchaser from the State, within the meaning of the Act of Congress.
But whether the purchase of the void certificate was made before or after the contest before the officers of the United States Land Department, as the plaintiff had never located' on the land, never occupied or improved it, never paid or contracted to pay for it, to the United States or the State of California, it would be neither according to equity nor good conscience to compel the defendant to convey to him the legal title.
Furthermore, there is no allegation in the complaint that the land for which it is alleged that the land in dispute was selected, has been lost to the State. Presumably, therefore, those lands were in place, and the land in dispute was not subject to selection, or if subject to selection, the right of selection had not accrued, because land within the exterior limits of a Mexican grant did not, under the Act of July 23, 1866, become subject to selection until it had been excluded from the grant, and the lines of the survey by the United States had been extended over it, and the Surveyor-General of the United States for the State had furnished the State *551with an official list of the sections of land which were within a reservation, or private grant, or settled upon, and, in consequence thereof, were lost to the State. (§ 6, Act July 23, 1866.) Such an official list was made necessary as the basis of selection of land in lieu of those lost sections, and until it was furnished, the right to select had not accrued, and the land in dispute was not subject to selection. (Sherman v. Bruick, 93 U. S. 209.)
It follows that the plaintiff has not, by his complaint, brought himself into such relations with the land in controversy as entitles him to call in question the decision of the United States Land Department awarding the land to the defendant, or to control the patent which was issued to him.
Judgment affirmed.
Myrick, Sharpstein, McKinstry, JJ., and Morrison, C. J., concurred.
In Jose Aurrecoechea v. Joseph L. Bangs et al., No. 7,447; Jose Aurrecoechea v. George Gerke et al., No. 7,448; Jose Aurrecoechea v. Amos L. Bangs et al., No. 7,449; Jose Aurrecoechea v. Bari B. French et al., No. 7,470; and Jose Aurrecoechea v. John W. Clark et al., No. 7,483, the judgments were upon demurrer to complaints similar to that in Aurrecoechea v. Bangs, No. 7,251, reported supra; and were affirmed upon the authority of that case.