MORROW, Circuit Judge.
This is a bill in equity brought by the United States against the Southern Pacific Railroad Company to establish and to enforce a trust in and for moneys received by said defendant for sales of land made by the defendant to numerous bona fide purchasers within the overlapping primary limits of the land grant made to the Atlantic & Pacific Railroad Company by the act of Congress approved July 27, 1866 (14 Stat. 292, C.-278), and the subsequent land grant made to the Southern Pacific Railroad Company by the act of Congress approved March 3, 1871 (16 Stat. 579, c. 122)'. The lands described in the bill of complaint are in the state of California, and were by mistake and error patented by the. United States to the defendant under the erroneous supposition that such lands were a part of the lands granted to said company by the act of Congress approved March 3, 1871. The bill also seeks an accounting for the moneys received by the defendant from the sales of such lands and a discovery under oath as to what sales of such lands have been made, the name of each purchaser of each tract, the date of each sale and the terms thereof, the agreed purchase price and the amount received thereon, and the date and amount of each payment of principal or interest upon each purchase. To this bill the defendant filed a general demurrer, on the ground that the bill did not state a cause entitling the plaintiff to the relief sought and prayed for in the bill against the defendant. The defendant also filed a special answer, making discovery under oath as to all matters and things concerning which discovery was specifically sought by the bill. The bill of complaint and demurrer, together with the special answer, having been set down for a hearing, the defendant contended, upon argument, that there was no jurisdiction in equity in the cause, and that the facts set forth in the bill did not entitle the plaintiff to any relief. Upon consideration, the court overruled the demurrer, and gave the defendant time in which to file a further answer. Defendant thereupon filed its further answer, and thereafter plaintiff and defendant entered into a stipulation as to the evidence of the case. The case is now before the court upon the facts stated in the bill of complaint, and in the special answer making discovery under oath, and the stipulations as to the evidence in the case.
It is stipulated, among other things, that all lands described in Exhibits A and B, attached to plaintiff’s complaint, are within the primary limits of the land grant made to the defendant, the Southern Pacific Railroad Company by the act of Congress approved March 3, 1871. and within the primary or indemnity limits of the land grant made to the Atlantic & Pacific Railroad Company by the act of Congress approved July 27, 1866, and that it has been finally and conclusively adjudged and determined in numerous suits in the United States Circuit Court for the Southern District of California and in the Supreme Court of the United States, in which the United States was plaintiff and the *98Southern Pacific Railroad Company and others were defendants, among other matters and things, that all lands common to the primary limits of the said land grant of March 3, 1871, to the Southern Pacific Railroad Company and primary or indemnity limits of said land grant of July 27, 1866, to the Atlantic & Pacific Railroad Company, became, upon passage of the forfeiture act of July 6, 1886 (24 Stat. 123, c. 637), the property of the United States, and by force of that act restored to the public domain, without the Southern Pacific Railroad Company having acquired any interest in said lands by or in virtue of said act of March 3, 1871, as affected the power of the United States to restore them to the public domain; that prior to March 3, 1887, the proper officers of the United States issued patents purporting to grant to the Southern Pacific Railroad- Company, as lands granted to it by the act of March 3, 1871, all lands described in Exhibit A and Exhibit B to plaintiff’s bill of complaint, except the S. E. % of N. W. J4 and lot 3 of N._W. % of section 19, township 1 N., nnge 18 W., which tract is within the Rancho el Conejo, and was never patented to said company; that Exhibits A and B attached to defendant’s answer contain full, true, and correct statements of all sales made by defendant of lands described in plaintiff’s bill of complaint, and of all material particulars thereof; that each and all of such purchases were made for full value of the lands at times of sale, without notice or knowledge of any claims or rights of the United States in or to the land purchased, by persons who, in good faith, believed they were purchasing from said company a good and sufficient title, except in so far as the purchasers had constructive notice that the lands purchased were granted by the act of July 27, 1866, to the Atlantic & Pacific Railroad Company, and were not granted to and did not belong to said Southern Pacific Railroad Company; that the title of each of the purchasers to the land purchased was confirmed by the act of Congress approved March 2, 1896 (29 Stat. 42, c. 39 [U. S. Comp. St. 1901, p. 1603]), that Exhibit A attached to plaintiff’s bill of complaint contains a true statement of entries made by persons whom the Secretary of the Interior adjudged and determined to be bona fide purchasers from the Southern Pacific Railroad Company of the lands described, according to the intent and meaning of 'the act of March 3, 1887 (24 Stat. 556, c. 376 [U. S. Comp. St. 1901, p. 1595]), and entitled to make such entries under the provisions of that act, except in so far as the lands, and entries are therein duplicated or repeated; that Exhibit B attached to plaintiff’s bill of complaint contains a true statement of lands which the United States Circuit Court at Los Angeles, Cal., in case No 184, referred to in plaintiff’s bill of complaint, adjudged and determined to be held by the persons in said exhibit named, who were bona fide purchasers thereof from said Southern Pacific Company, according to the intent and meaning of the act of March 2, 1896, and whose title stood confirmed by the provisions of that act, except in so far as the lands therein described are duplicated or repeated; and, as each said claim was confirmed by the Secretary of the Interior he wrote to that company, requesting payment unto the United States of the amount received by that company for the sale of such lands, not exceeding $1.25 per acre; that certain lands described in the stipulation *99were the subject of the suit between the parties to the present action, final action in which in the Supreme Court of the United States was reported in United States v. Southern Pacific Railroad Company, 146 U. S. 570-614, 13 Sup. Ct. 152, 36 L. Ed. 1091; that in that case the United States did not pray for judgment or decree for the value of said lands or for any money judgment other than costs of suit; that all lands described in Exhibit A attached to plaintiff’s bill of complaint, other than the lands just mentioned, and all lands in Exhibit B attached to said complaint, were the subject of the suit between the parties to the present action, final decision of which in the Supreme Court of the United States was reported in Southern Pacific Railroad Company v. United States, 168 U. S. 1-66, 18 Sup. Ct. 18, 42 L. Ed. 355, and United States v. Southern Pacific Railroad Company, 184 U. S. 49-61, 22 Sup. Ct. 285, 46 L. Ed. 425; that all persons named in said exhibits as bona fide purchasers of the lands other than the lands heretofore described, were defendants in the last-named suit.
The act of March 3, 1887 (24 Stat. 556, c. 376 [U. S. Comp. St. 1901, p. 1595]), provided for the adjustment of railroads and for the forfeiture of unearned lands, for the cancellation of patents wrongfully issued to railroad companies, for the issuing of new patents to innocent purchasers, and for the recovery from such companies of the government price for the lands so patented and sold. Section 4 of the act provided that after cancellation of the erroneously issued railroad company patent, and the issuance of a new patent to the purchaser in good faith from the railroad company, “the Secretary ’of the Interior, on behalf of the United States, shall demand payment from the company which has so disposed of such lands, of an amount equal to the government price of similar lands; and in case of neglect or refusal of such company to make payment as hereafter specified, within ninety days after the demand shall have been made, the Attorney General shall cause suit or suits to be brought against such company for the said amount.” By the act of Congress approved February 12, 1896 (29 Stat. 6, c. 18 [U. S. Comp. St. 1901, p. 1596]), it was provided:
“That where such purchasers, their heirs or assigns, have paid only a portion of the purchase price to the company, which is less than the Government price of similar lands, they shall be required, before the delivery of patent for their lands, to pay to the government a sum equal to the difference between the portion of the purchase price so paid and the Government price, and in such case the amount demanded from the company shall be the amount paid to it by such purchaser.”
The act of March 2, 1896 (29 Stat. 42, c. 39 [U. S. Comp. St. 1901, p. 1603]), provided that where a purchaser of land patented to a railroad company is found by a decree of court, or in certain cases by the Secretary of the Interior, to have purchased in good faith, suit shall be brought against the company to recover the minimum price of the land. It is contended on behalf of the defendant that the material facts stated in the bill of complaint, and admitted and disclosed in the answer in discovery, and further admitted in the stipulation as to evidence, constitute the case an action at law, and not a controversy of equitable jurisdiction. The court is unable to take this view of the case. It may be that with the evidence now before the *100court, obtained by the equitable powers of the court, a decree can-be entered in favor of the plaintiff for a certain sum of money in satisfaction of plaintiff’s demand; but it does not appear that the United States was in possession of this evidence when the complaint was filed. We must look at this case from the standpoint of the plaintiff when the suit was commenced. The question was-then: Would an action at law in the nature of indebitatus assumpsit on implied promise furnish the plaintiff a remedy as certain, complete,, prompt, and efficient to attain the ends of justice, as that of a bill inequity? Oelrichs v. Spain, 15 Wall. 211, 228, 21 L. Ed. 43; Kilbourn v. Sunderland, 130 U. S. 505, 514, 515, 9 Sup. Ct. 594, 32 L. Ed. 1005. An examination of the bill of complaint upon the challenge of a demurrer left the court in no doubt whatever as to the answer to that question. The bill of complaint called for equitable-relief. It sought to declare a trust, and prayed for an accounting and discovery. That the bill upon its face presented sufficient avermentsof fact to authorize equitable interposition and relief cannot be questioned. Southern Pacific Railroad Company v. United States, 133 Fed. 651, 657, 66 C. C. A. 581. Assuming that the bill of complaint, answer, and stipulated evidence dispose of the question of further accounting, that the relief by discovery has been obtained, and that the trust will be satisfied by a decree in favor of the ^plaintiff for a specified sum of money, will this final result make the case any less a case in equity? Manifestly not. “Where a court of equity is-authorized to take jurisdiction over a cause for any purpose, it may retain the cause for all purposes within the scope of the equities to be-enforced, and proceed to a final determination of all the matters at issue-therein.” Southern Pacific Railroad Company v. United States, supra, and the cases there cited. The controversy, as stated in the bill, involved an accounting relating to numerous sales of land to different persons for different amounts and at different dates during a period' of many years. An investigation of an account of such transactions should only be made by the methods peculiar to courts of equity. Kirby v. Lake Shore, etc., Railroad, 120 U. S. 130, 134, 7 Sup. Ct. 430, 30 L. Ed. 569.
It is objected that the plaintiff • bases its right of action upon the authority granted by the acts of March 3, 1887, and March 2, 1896, and that these acts are based upon the provisions contained in the original granting act of July 27, 1866, reserving the right and power to alter, amend, and repeal the act; that the two acts named do not constitute an exercise of such reserve power, because those acts-relate only to lands not granted. The objection is hypercritical. The acts relate to the erroneous conveyance of lands under the supposed authority of the original granting acts, and in this respect may be deemed amendatory to such acts. But they have a broader foundation than that. They are independent acts, and do not purport to alter, amend, or repeal the act of July 27, 1866, granting lands to the Atlantic & Pacific Railroad Company, or the act of March 3, 1871, granting lands to the Southern Pacific Railroad Company. They were passed by Congress pursuant to its- constitutional authority to make all needful rules and regulations respecting the territory or other prop*101erty belonging to the United States. Under this authority, Congress is vested with full power to protect its interest in the public lands, and to adopt such measures as will secure by legal procedure either a reconveyance of, or compensation for, lands improperly conveyed. The acts of March 3, 1887, and March 2, 1896, are in exercise of this power. The defendant has sold to innocent purchasers public lands to which it had no title. It is now called upon in this action to account for such sales and pay to the government the price of such lands. It is an action clearly authorized by law.
Let a decree be entered in favor of the plaintiff.