This is an original application in this court for a writ of mandate commanding the officers composing the state board of land commissioners to accept the application of the plaintiff to enter a certain eighty-acre tract of land in a Carey Act segregation located within this state. The plaintiff alleges that he is qualified, under the laws of the United States and of the state of Idaho, to enter the land as a Carey Act homestead; that pursuant to the act of Congress commonly known as the Carey Act, 28 Stat. at L. 422 (5 U. S. *742Comp. Stats. 1916, sec. 4685, 8 Fed. Stats. Ann., 2d ed., p. 698), and acts amendatory thereof, the principal amendatory act thereof being found in 29 Stat. at L. 434, and the statutes of the state of Idaho accepting the provisions of the Carey Act, and acts amendatory thereof, being Rev. Codes, secs. 1613 to 1634, the government of the United States did, on the nineteenth day of February, 1915, issue its patent to the state of Idaho for the land sought to be entered and other lands; that on the twelfth day of October, 1917, the state board of land commissioners gave notice, pursuant to the provisions of Rev. Codes, sec. 1625, that the land in question, and other lands, were open for entry and settlement; that the tract of land in question was, and now is, open for entry and sale and unappropriated under the laws above mentioned, and that the plaintiff had complied with all the provisions of Rev. Codes, see. 1626, which prescribes the qualifications and prerequisites to making an entry on Carey Act land; that plaintiff made his application to enter the land on September 1, 1917, and that on July 1, 1918, the state board of land commissioners refused to accept his entry, and still so refuses.
Upon the filing of the petition an alternative writ was issued. The defendants interposed a general demurrer to the petition. Certain persons alleging that they were prior settlers upon the segregation obtained leave to file a petition in intervention, in which they set out the provisions of the contracts between themselves and the Idaho Irrigation Company, Ltd., which is the construction company authorized to construct the works for irrigating and reclaiming said segregation, and alleged that the water supply is insufficient for reclamation of any additional lands over and above those already entered in said segregation.
Plaintiff moved to strike the petition in intervention. It is apparent at the outset that if the state board of land commissioners is invested with the right to consider such matters as are presented by the petition in intervention as a ground for accepting or refusing to accept the application of plaintiff, the writ should not issue. It will be unnecessary, there*743fore, in this proceeding, to consider the petition in intervention.
The plaintiff has presented the case upon the theory that when patent issues from the United States to the state of Idaho, by virtue of the provisions of the Carey Act, the land embraced within the patent is held in trust by the state for the settlers at that time upon the land and those who subsequently settle thereon. He argues that as to settlers who might subsequently settle upon the land patented to the state, the trust created was an executory trust, and that the state board of land commissioners is thereby merely vested with the ministerial duty of receiving entries of settlers upon the land and conveying title thereto to the settlers when they comply with the provisions of the act. But we do not think that the capacity in which the state holds title to this land is necessarily involved in the consideration of this ease. The solution is to be found by an examination of our own statutes prescribing the duties of the state board of land commissioners in connection with Carey Act segregations.
Under our statutes the board is vested with very wide discretionary powers in the matter of making applications for the segregation of lands under the Carey Act, as well as in the execution of contracts with construction companies as to the size and character of the works to be constructed for the reclamation of lands, also as to the maximum amount of water which must be supplied for each acre of land at the settler’s headgate, the price per acre which the construction company may charge for the construction of its works, and in regard to many other provisions which may enter into the contract. The board is also vested with discretion as to when it shall declare a Oarey Act segregation, or a portion thereof, open for settlement. But in the matter of permitting entries upon these lands after they are thrown open for settlement the law has guarded against any discrimination being practiced in favor of or against any applicant. Rev. Codes, sec. 1626, provides that any citizen of the United States, or any person having declared his intention to become a citizen of the United States (except married women) over the age of *744twenty-one years, may make application to enter lands and prescribes the conditions upon which such applications may be made. It is true that in this section are to be found the following provisions: “The board shall thereupon file in its office the application and papers relating thereto, and, if allowed, issue a certificate of location to the applicant. All applications for entry shall be accompanied by a payment of twenty-five cents per acre, which shall be paid as a partial payment on the land if the application is allowed; and all certificates when issued shall be recorded in a book to be kept for that purpose. If the application is not allowed, the twenty-five cents per acre accompanying it shall be refunded to the applicant.”
Mandamus lies only to compel performance of an unqualified duty imposed by law. If the officer sought to be commanded by the writ to perform a duty is vested with lawful discretion as to whether or not he shall perform the act, the writ will not issue. If he is vested with discretion as to the manner in which he will perform the duty, mandamus may lie to require him to act, without assuming to direct the manner in which he shall perform his duty. A casual reading of the portion of the statute quoted above might lead to the conclusion that by its terms the board is vested with the right to allow or disallow an application for entry. We do not think, however, that the language of the statute is conclusive. The applicant may fail to show his qualifications under the statute, or his application may be defective in failing to show a compliance with some of the conditions prerequisite to a right of entry. In that event the board would have authority to disallow the application. The qualifications of an entryman, and the conditions precedent to his right to make an entry, are carefully and completely defined by statute. When an applicant possesses the necessary qualifications, and has complied with the conditions precedent to his right to enter a tract of land in a Carey Act segregation, he must be permitted to make the entry. If, upon such showing being made, the" board should refuse to allow his entry mandamus will lie to compel its acceptance; otherwise, no means exist to *745prevent discrimination between entrymen. The board having by its notice, published as required by law, notified-the public that the tract of land involved in this case, together with other land, is open for entry under the provisions of the Carey Act, cannot while that notice to the world is left standing unimpaired, refuse to accept an entry applied for by one who shows himself entitled to make an entry within the provisions of the law.
In so holding, we are expressing no opinion as to the relief, if any, to which prior settlers upon the segregation may be entitled by reason of their claim that they have become purchasers of the entire water supply available for the tract. Clearly they are not entitled to be heard in this action. If they are entitled to relief it must be obtained in a different form of action.
The motion to strike the petition in intervention is allowed, and the demurrer to the petition is overruled. The board is granted ten days in which to answer, failing which a peremptory writ will issue.
Budge, C. J., and Morgan, J., concur.