This is an appeal from a judgment for the defendants rendered in pursuance of an order sustaining a demurrer to the complaint.
The complaint was in substance as follows, viz.: “ The *362district attorney of the first judicial district, in which is situate the county of Ouster, has been applied to, to bring this action, and that he has refused, so to do upon the complaint of the appellant, who therefore brings this action upon his own relation. That the respondents have intruded into the office of county commissioners of said county, and now unlawfully hold and exercise the said offices. That on the 7th-day of November, 1882, the appellant was duly elected to the office of county commissioner of said county, and that he did, within the time prescribed by law, qualify himself to hold said office, and entered upon the performance of its duties; and is still entitled to the said office and the emoluments thereof. That on or about the 1st day of May, 1882, Russell Briggs was duly appointed by the probate judge of said county as one of the commissioners thereof, to fill a vacancy, and duly qualified and entered upon the duties of the office. That on or about the 1st day of September, 1882, James B. Hubbell was duly appointed one of the commissioners of said county to fill a vacancy, who also duly qualified and entered upon the duties of the office. That on or about the 15th day of March, 1883, at the time of the alleged unlawful intrusion, while the three last named persons were in possession of and entitled to these offices, the respondents usurped and intruded into and now unlawfully hold them and withhold the same from the relator, and said Briggs and Hubbell. Wherefore the appellant asked that the respondents be ousted from said offices, and the relator, and Briggs and Hubbell, be restored thereto.”
The demurrer was upon the ground that the complaint did not state facts sufficient to constitute a cause of action.
The question presented by this demurrer relates to the validity of an act of the legislative assembly of Montana territory — laws of the thirteenth regular session, page lAO — by which the offices of county commissioners of *363Custer county were declared.vacant; this relator and Briggs and Hubbell being the then incumbents of said offices, and the respondents appointed to fill the vacancies. The language of the statute, so far as it is necessary to state it, is as follows: “That the offices of county commissioners of the county of Ouster be, and the said offices are hereby, declared to be vacant, and no official duty shall be performed by the persons constituting the present board of county commissioners, except to make report; . . . and that William Van Gaskin, George M. Miles and Thomas J. Bryan are hereby appointed commissioners of Ouster county., The act then provided for the election upon the third Monday of April following of three commissioners of Ouster county, who, after their election and qualification, should act as said commissioners and enter upon their official duties, and thereupon the power’s and duties of said commissioners herein appointed shall cease.” The act was approved March 8, 1883.
It is claimed by the appellant that the above act is invalid, for the alleged reason that it contravenes the constitution of the United States and the laws of congress. The declaration that the act of a co-ordinate branch of the government has been done in disregard of constitutional limitations is the exercise of a solemn function, and one which courts will exert with delicacy and reluctance. An act of the legislature should not be adjudged to be in violation of the constitution except where plainly repugnant thereto. The act will be presumed to be constitutional until the contrary is clearly and satisfactorily shown. “ Plenary power in the legislature is the rule. A prohibition to exercise a particular power is the exception. In inquiring, therefore,- whether a given statute is constitutional, it is for those who question its validity to show it is forbidden.” Denio, C. J., in People v. Draper, 15 N. Y. 532. “A court cannot, declare a statute unconstitutional and void solely on the ground of *364unjust and oppressive provisions, or because it is supposed to violate the natural, social or political rights of the citizen, unless it can be shown that such injustice is prohibited, or such rights guarantied or protected by the constitution. ” Cooley on Constitutional Limitations, 19 J.
In a case of this kind, it is only with the power of the legislature viewed in relation to the fundamental law, and not with the expediency or propriety of its legislation, that the court has to do. These are matters for the consideration of the legislature itself, when it enacts the law. The above act can only be declared invalid because it violates the constitution of the United States, or the acts of congress, or interferes with or prevents the exercise of some right conferred or protected thereby. The act of congress in relation to county officers is as follows: “ All township, district and county officers, except justices of the peace and general officers of the militia, shall be appointed or elected in such manner as may be provided by the governor and legislative assembly of each territory.” It will be observed that this act uses the term “ county officers,” thus recognizing the political division of the territory into counties, and the necessity for, and the existence of, such officers for their government. But the particular office of county commissioner is not named therein, and the creation thereof was left entirely to legislative enactment. The office of county commissioner in this territory does not exist by virtue of common law, but by statutory law. And we find that the legislative assembly, in providing for the goverment of counties, acted in accordance with both these views. It created the office of county commissioner. It provided that ‘ ‘ the powers of the county, as a body corporate and politic, shall be exercised by a board of county commissioners therefor.” R. S. 1819, p. 419, sec. 331. “The board of county commissioners shall consist of three qualified electors, any two of whom shall be competent to transact business.” The creation, therefore, of county *365commissioners; the manner of their selection, whether by election or appointment; the terms of the period during which they shall act; the character of the duties to be performed, and the compensation to be paid for the performance of such duties, are entirely the subject of legislative enactment. There is nothing in the above act of congress which in any way limits the power of the legislative assembly in respect to the foregoing particulars. All the above matters relating to county commissioners are, by this act. committed to the governor and legislative assembly of the territory, when acting together in a legislative capacity, to be provided for according to their discretion.
So far, therefore, as the above act of congress is concerned, this office, having been created by legislative enactment, -was wholly under legislative control. It had the power to lengthen or abridge the term of office, or to declare the office vacant and appoint another to fill the vacancy, at least in so far as to make a provisional appointment was concerned. By the enactment of the law appointing the respondents to the offices thereby declared vacant, until the commissioners thereafter to be elected assumed the duties of their office, the governor and the legislative assembly acted within the limits of the act of congress, which required that the county officers should be appointed or elected in such manner as they might provide. The governor and legislative assembly have the power to provide the manner of the appointment; therefore, they had’the power to appoint directly. The law was “the manner” of the appointments. “Where an office is created by statute, it is wholly within the control of the legislature. The term, the mode of appointment, and the compensation may be altered at pleasure, and the latter may even be taken away without abolishing the office. Such extreme legislation is not to be deemed probable in any case. But we are now discussing the legislative power, not its expediency or pro*366priety. Having the power, -the legislature will exercise it for the public good, and it is the sole pledge of the exigency which demands its interference.” Sanford, J., 2 Sanford, 355, 359.
We may say here in relation to the legislation in question that the presumption will be that it was had for the public good, and that the exigency of the' case required its enactment. “ The selection of officers, who are nothing more than public agents, for the effectuating of public purposes, is matter of public convenience or necessity; and so too are the periods for the appointment of such agents; but neither the one nor the other of these arrangements can constitute any obligation to continue such agents, or to reappoint them after the measures which brought them into being shall have been found useless, shall have been fulfilled, or shall have been abrogated, or even detrimental to the well-being of the public. The promised compensation for services actually performed and accepted during the continuance of the particular agency may undoubtedly be claimed both upon principles of compact and of equity; but to insist beyond this, upon the perpetuation of a public policy, either useless or detrimental, and upon a reward for acts neither desired nor performed, would appear to be reconcilable with neither comm'on justice nor common sense.” The supreme court of the United States, per Daniel, J., in Butler v. Penna, 10 How. 402.
In Demer v. Hobart, 10 Nev. 28, Hawley, J., speaking for the supreme court, says: “ The legislature having, by the act of March 4, 1865, vested certain duties upon the lieutenant-governor, and allowed him a salary for his services, it was within the power of the legislature to take those duties and the salary away from him before the expiration of his term of office, and confer them upon another.” Connor v. The Mayor of New York, 5 N. Y. 294; Attorney-General v. Squires, 14 Cal. 13. “ The offices of lieutenant-governor and warden of the state *367prison were as distinct as though filled by different persons. The duties and obligations of the one are entirely independent of the duties and obligations of the other. So far as the office of ex officio warden existed in relator, it was an office created by legislative act. The legislature might, at any time, direct how it should be filled, what compensation should be allowed, and provide the manner in which its duties should be discharged. In such cases, the length of the term of office is regulated by considerations which affect the public interest, without any regard to the interests of the office-holder.”
In Attorney-General v. Squires, 14 Cal. 13, supra, Baldwin, J., says: “The same power that made can destroy; unless, indeed, there be some vested right created by the act, or some right of property. So far as this office exists in the incumbent, it is an office created by legislative act. The constitution affixes no period of tenure to this office of tax collector, nor does it provide any mode of appointment. The vesting of this office in the sheriff being by legislative act, though the office cannot be destroyed by the legislature, yet the legislature, not restricted in this respect by the constitution, may direct in what manner the duties shall be discharged, and how the office may be temporarily filled. Smith v. Still-man, decided in 1852 (not reported), has been cited to show that after the legislature has created an office contemplated, as provided for by the constitution, it cannot destroy the office of the incumbent during his term. But this doctrine cannot be maintained, and is ovei’ruled in effect by the case of The People v. Haskell, 5 Cal. 357. We regard this act of the legislature, giving this office to the sheriff, as a mere legislative transfer to this officer of the duties of tax collector, and that the same power which placed them in the hands of the sheriff could divest them and place them in other hands.” In Bryan v. Cattell, 15 Iowa, 538, Wright, C. J., said: “That it is competent for the legislature to abolish an office, in-' *368crease or decrease the duties devolving upon the incumbent, add to or take from his salary, when not inhibited by the constitution, we entertain no doubt. We are equally clear that it is within the legislative power to add to or change the method in which vacancies may occur, and make such change applicable to existing offices and those holding them.” See, also, People v. Haskell, 5 Cal. 557; People v. Whitlock, 92 N. Y. 191; Long v. Mayor, 81 N. Y. 425; Barker v. City of Pittsburg, 1 Barr (Pa. St.), 51.
In Donahue v. County of Will, 109 Ill. 94, Walker, J., delivering the opinion o.f the court, says: “The question is then presented, whether the board of supervisors had legal authority and constitutional power to hear, determine and remove appellant from office. He claims it had not, because that could be done only by impeachment; or if not in that mode, then only by the circuit court on a proceeding in the nature of a quo ivarranto. It is urged that, under the constitution, the general assembly is powerless to pass a law conferring such power on the board of supervisors, and for that reason the order of the board is absolutely void. This depends upon whether any constitutional provision prohibits that body from the exercise of such power. . . .We are, therefore, of opinion that the settling of the treasurer’s accounts, and finding he had not settled and acccounted for moneys of the county as required by law, and that he had been and then was in arrears with the county, and removing him from office, was not judicial. And we have no doubt the general assembly had ample power to authorize the board to act, and it is legal, valid.”
It was held at the present term of this court in the case of Carland v. The Commissioners of Custer County, 5 Mont. infra, that the board of county commissioners of Custer county had authority, by virtue of power vested in it by acts of the legislature of this territory, to remove the treasurer of that county from office, and to declare *369the office vacant. It is true that in both of the above cases the power to remove had been delegated, but the. principle announced is, that, in the absence of a constitutional prohibition, the legislature possesses authority to delegate such power of removal. And if the legislature had the authority to delegate to the board the power of removal of the officer, it would be difficult to give any substantial reason why it could not exercise the same power directly.
In People v. Hurlbut, 24 Mich. 44, Christiancy, J., says: “As the legislature represents the public interest, and has full control of all municipal organizations as instrumentalities of government, I see no reason to doubt their power of creating such offices as they may think the public interest requires, or of filling them with such persons as thejr choose to designate in the act, except as that power is restrained by some provision of the constitution. This course of legislation may not be wise or politic, but as a question of power, I think the legislature possesses it, with the limitations above mentioned.”
There is no limitation of the power of the governor and legislative assembly, conferred by the foregoing act of congress. In the same case the same judge says: “ The next objection to the validity of the act is, that the power of the legislature is confined to directing whether officers other than judicial in cities and villages shall be elected or appointed; and at what time and in what manner the election or appointment shall be made; that in thus directing, their power' is exhausted, and they cannot make the appointment themselves. This argument is not based upon the ground that the provisions of this section were intended to confine the power of making the appointment to the common council of the city, or to any other local authority, for which only, it was intended, the legislature should provide; but it goes upon the assumption that, even admitting the power of the legislature to provide for an appointment *370otherwise than by the local authorities of the city, still the legislature could not itself make the appointment in the manner they have undertaken by this act to make it; their power being limited to directing the time and manner in which it should be made. Though this argument may seem plausible, I do not think the conclusion is so clear or free from doubt as to authorize us to declare the act void on this ground. If the legislature had power to provide the time and manner of the appointment, and were not confined to providing for the appointment by the local authorities, then they had the power to provide that it should be made by the governor, with or without the consent of the senate; by the legislature in joint convention; or, finally, by the legislature in the very form and manner which was adopted. And if they had the power to direct that it should be made in this way, it would be very difficult to give any substantial reason why they could not proceed to make the appointment as they did without first passing an act that it should be so made. Such an act would be but a legislative determination that the appointment should be so made; and the actual making of it in this way shows the like legislative determination. A similar exercise of power by the legislature has been upheld by the supreme court of New York. People v. Bennett, 54 Barb. 480.”
It is true that the above doctrine has not been acceded to in many instances to its fullest extent. Some eminent jurists assume to find in the very structure of our government, and in the principles which underlie our free institutions, and in the assumption in our constitutions generally of the existence of public or quasi corporations, such as counties and townships, and consequently in a recognition by them of the existence of local self-government, an implied prohibition upon the legislature to take away the right of choice, by the inhabitants of such municipalities, of their own officers, by appointments to such offices in legislative acts. But even in *371these instances it is generally conceded that there may he occasions and exigencies when the legislature may exercise this power. As, for example, when an appointment may be made by the legislature, “to meet the needs of a transition state, or to bridge a chasm between a new and old establishment, or to organize and put in motion a new corporate or municipal organization.” Graves, J., in People v. Hurlbut, supra.
“I have no doubt it was entirely competent for the legislature to abolish the old boards and provide for a new one to take the place of all. That would be but the ordinary exercise of legislative supervision and control in matters of municipal regulation of them. I think, also, that the legislature might make provisional appointments to put the new system in operation. The right to do this appears to me to be incident to the right to confer and recall corporate power, and rests upon the same ground as the right to provide agencies for the organization of the municipal corporation in the first place, for the apportionment of its property and debts, if its territory shall be divided and organized into two, or for the winding up of its concerns, if its charter should be taken away. There is no doubt of the right of the state to do any of these things; not by virtue of any general authority to take to itself the management of the local concerns, but because the wrong motion and modification of local government can only be provided for without confusion and injustice by the aid of the guiding and assisting hand of the authority that creates and modifies.” Cooley, J., in People v. Hurlbut, supra.
The act in question provides only for the appointment of the respondents to hold such offices for about the period of six weeks, when local self-government should intervene, and commissioners should be chosen to succeed the legislative appointees. They were, therefore, merely provisional officers, and not permanent appointments to office. The power of the legislature to declare *372a vacancy appears to be clear. This power was exercised by the act; and the appointment was evidently made as necessary for the conduct of its affairs until its people made their own selection of commissioners. The appointment was made to meet the necessities of a transition state from an “old to a new establishment; ” from the declaration of the vacancy until the interposition of a local self-government. It is claimed, however, that the acceptance of these offices by appellants constitutes a contract between them and the public which cannot be annulled without violating that provision of the constitution of the United States which prohibits any state from “passing any law impairing the obligation of contracts ” (section 10, article I, constitution of the United States); nor without violating that other provision of the amendments to the constitution, article V, that no one shall be “deprived of . . . property without due process of law.” That “ the office is property; that the occupant has the same light to it as to any other property. This right cannot be abrogated or impaired unless by consent.”
We cannot give our assent to this doctrine. Counties are usually classed under the head of public or quasi corporations, and exist for the convenience of government. The municipal authority of counties is a part of the machinery of state or territorial government, and exists for its assistance and benefit. The regulation of the affairs of a county is intrusted to persons, called in this territory county commissioners, who perform the duties of their office by virtue of the authority of the legislature, which prescribes what those duties are. The authority exercised by these commissioners is, therefore, entirely for the benefit of the public, and not for any private benefit whatever. Under our form of government these offices exist by reason of a public necessity and as a part of the machinery of territorial government. They should, therefore, be entirely under its con*373trol. The very nature of government would forbid that the incumbents of its offices could obtain a private right therein which would enable them to exercise such offices against the will of the state. This would be repugnant to the principle of the sovereignty of the state, which should have the power to determine always who shall be its agents to exercise its authority, restricted only by the fundamental law. We are of opinion, therefore, that the incumbent of the office of county commissioner, by the acceptance of the office, does not obtain such a right therein as is comprehended in the meaning of the above provisions of the constitution of the United States.
We are not, however, left to conjecture as to this principle, for it has been already decided for us by the supreme court of the United States in Butler v. Penna, supra. Daniel, J., in addition to what is quoted above, says: “It follows, then, upon principle, that in every perfect or competent government there must exist a general power to enact or repeal laws, and to create or change or discontinue the agents designated for the execution of those laws. Such a power is indispensable for the preservation of the body politic, and for the safety of the individuals of the community. . . . We have already shown that the appointment to and the tenure of an office created for the public use, and the regulation of the salary affixed to such an office, do not fall within the meaning of the section of the constitution relied on by the plaintiffs in error; do not come within the import of the term contracts, or, in other words, the vested private, personal rights thereby intended to be protected. They are functions appropriate to that class of powers and obligations by which governments are enabled, and are called upon, to foster and promote the general good; functions, therefore, which governments cannot be presumed to have surrendered, if, indeed, they can, under any circumstances, be justified in surrendering them.” The learned judge here refers to the cases of The *374Charles River Bridge v. The Warren Bridge, 11 Pet. 420; The State of Maryland v. The Baltimore & Ohio R. R. Co. 3 How. 534; The People v. Morris, 13 Wend. 325. The learned judge then quotes with approbation the following from the opinion in the case of Commonwealth v. Bacon, 6 Serg. & Rawle, 322: “These services, says Duncan, J., in delivering the opinion, rendered by public officers, do not, in this particular, partake of the nature of contracts, nor have they the remotest privity thereto. As to a stipulated allowance, that-allowance, whether annual, per diem, or particular fees for particular services, depends on the will of the law makers.” Also tlie following from the opinion of the court in the case of Commonwealth v. Mann, 5 Watts & Serg. 418: “ That, if the salaries of judges and their title to office could be put upon the ground of contract, then a most grievous wrong has been done them by the people by the reduction of a tenure during good behavior to a tenure for a term of years. The point that it is a contract, or partakes of the nature of a contract, will not bear the test of examination.”
In Donahue v. County of Will, 100 Ill. 94, Walker, J., delivering the opinion of the court, says: “It is impossible to conceive how, under our form of government, a person can own or have a title to a governmental office. Offices are created for the administration of public affairs. When a person is inducted into an office he thereby becomes empowered to exercise its powers and perform its duties, not for his, but the public, benefit. It would be a misnomer and a perversion of terms to say that an incumbent owned an office, or had any title to it.”
The above decisions recognize the principle that public office is a public trust. That a public office exists not at all for the benefit of the incumbent, but only for that of the public. That it is not a grant to the incumbent, nor is it in the nature of a contract between the incumbent and the commonwealth. That public officers are the *375agents of government, and that it would he inconsistent with the objects, character and purposes of government not to be able, within constitutional limits and when expedient and proper, of which expediency and propriety it is the sole judge, to create, modify or abolish them at its pleasure.
When a public office, its terms, duties and compensation, are provided for in a constitution, it would not be competent for a legislature to abolish or modify these, any more than it would to violate any other provision thereof. But, as we have seen, this is not such a case. We are therefore of opinion that the act of the legislative assembly declaring vacant the offices of the county commissioners of Custer county, and appointing other persons to fill the vacancies created thereby until the commissioners to be elected thereafter might qualify and take upon themselves the duties of their respective offices, was within its power to enact, and that the same was a valid law. The question as to the legality of the session of the court at which judgment in this case was rendered was considered in the case of Carland v. The Commissioners of Custer County, decided at this term, 5 Mont, infra,where it was held that the proceedings had at that term of the court were regular and valid.
Judgment affirmed.