The opinion of the court was delivered by
Benson, J.:Laws regulating the operation of coalmines, have been in force in this state since the year 1875. In that year a statute was enacted requiring the construction of escapement-shafts, guarding against the obstruction of airways, and otherwise providing for the safety of employees. (Laws 1875, ch. 115.) 'In 1883 an acj; was passed better to promote the same purposes, with more comprehensive regulations, requiring also the guarding of machinery and making provisions for safety appliances and' for the inspection of coal-mines. (Laws 1883, ch. 117.) This act was amended in 1885, and the following provision was added:
“No miner, workman or other person shall take into any mine more than five pounds of powder at one time, and this shall be used before taking any more into the mine; and all powder or other explosive substance shall be kept in a close, tight vessel.” (Laws 1885, ch. 143, §2.)
Another act was passed in 1889 “to provide for the protection of life and property in and about coalmines.” (Laws 1889, ch. 172.) This act required the employment of “shot-firers,” and provided regulations for shot-firing.
The following section was enacted in 1891:
“It shall be unlawful for any miner or other person to take into or have in his possession in any coal-mine shaft, slope, or pit, in this state, more than twelve and one-half (12%) pounds of powder or any other explosive substance at any one time; and all such powder or other explosive substance shall be kept in a tight box securely locked, and such boxes shall be kept at least twenty yards from the working-face in all such *216coal-mine slopes, drifts, or pits; and it shall be the duty of all pit-bosses or other persons who shall be in charge and control of any coal-mine slope, drift or pit in this state, to keep watch over and see that the provisions of this act are complied with; and any person violating or neglecting to comply with the provisions of this act shall be deemed guilty of a misdemeanor, and shall, on conviction before any court having jurisdiction thereof, be fined in any sum not less than ten nor more than fifty dollars, or by imprisonment in the county jail not more than thirty days, for each and every such offense; and the possession of more than twelve and one-half pounds of powder, or any other explosive substance, in such coal-mine slope, or drift, shall be prima facie evidence of the person taking said powder, or other explosive substance, into such mine, slope, or drift.” (Laws 1891, ch. 147, § 1.)
These various statutes, and some others relating to the same subject, will be found in'sections 4109 to 4174, inclusive, of the General Statutes of 1901, and clearly indicate the policy of the state to provide for safety in the operation of coal-mines as a distinct subject of legislation. It will be observed, also, that this legislation has been progressive, provisions .for safeguards having been added from time to time. In 1885 the first regulation was made concerning the use of explosives, limiting the quantity to be taken into the mine at one time to five pounds of powder or other explosive. In 1891 the quantity was increased to twelve and a half pounds, and additional precautions were provided. In. the act of 1907, now under consideration, a specific regulation was made concerning black powder alone. Thus it appears that the legislature for many years has deemed it wise to restrict the use of explosives in coal-mines, and adopted this specific regulation as part of the law on that subject.
. If this last act is void because it relates to coal-mines alone, and because it does not refer to lead, zinc, and other mines and quarries, as counsel contend, then for the same reason the other regulations contained in the statutes referred to must fall with it, for all are re*217stricted to the one subject. That a law operates only upon a class does not make it invalid, if the classification is reasonable. If the classification is arbitrary or fictitious it is objectionable, but where it is based upon such differences in situation as to be reasonable in view of the purpose to be accomplished, and tends fairly to accomplish that purpose, it must be upheld. (Rambo v. Larrabee, 67 Kan. 634, 73 Pac. 915.) It is sufficient if the classification is based upon some reasonable ground—some differences which bear a just and proper relation to the attempted classification, and is not a. mere arbitrary selection. (Magoun v. Illinois Trust & Savings Bank, 170 U. S. 283, 18 Sup. Ct. 594, 42 L. Ed. 1037.)
The coal-mining industry of the state is of great and growing importance, about 12,000 men being employed in this occupation in this state. The hazards incident to this work are matters of common knowledge, and proper regulations to secure the safety of employees, so far as possible, is a matter appealing strongly to the wisdom and conscience of the legislature. Regulations to promote this beneficent end are not void because they do not relate to other industries, where, if' the peril is as great, the conditions at least are different and may properly call for different regulations.
It is also contended that the act is void because the. restrictions, are upon black powder alone. This article appears to be in common use in coal-mining in this, country (86 International Library of Technology, § 36, par. 9-16), and we may presume that this was the reason for legislative action upon it. The important question, however, relates to the power of the legislature to act, rather than the reason for its action. Speaking generally, laws may be enacted to promote the health and safety of the people, and will be upheld when they have a necessary or reasonable relation to the accomplishment of such ends. Mr. Justice Harlan, in delivering the opinion of the court in a case involving the *218validity of a statute regulating the inspection of'oils, said:
“It [the supreme court] has, nevertheless, with marked distinctness and uniformity, recognized the necessity, growing out of the fundamental conditions of civil society, of upholding state police regulations which were enacted in good faith, and had appropriate and direct connection with that protection to life, health, and property, which each state owes to her citizens.” (Patterson v. Kentucky, 97 U. S. 501, 506, 24 L. Ed. 1115.)
This language was quoted with approval in Mugler v. Kansas, 123 U. S. 623, 666, 8 Sup.. Ct. 273, 31 L. Ed. 205. In another case the same court said:
“But the clause [of the fourteenth amendment] does not limit, nor was it designed to limit, the subjects upon which the police power of the state may be exerted. The state can now, as before, prescribe regulations for the health, good order and safety of society, and adopt such measures as will advance its interests and prosperity. And to accomplish this end special legislation must be resorted to in numerous cases, providing against accidents, disease and danger, in the varied forms in which they may come. The nature and extent of such legislation will necessarily depend upon the judgment of the legislature as to the security needed by society. When ■ the calling, profession or business of parties is unattended with danger to others, little legislation will be necessary respecting it. Thus, in the purchase and sale of most articles, of general use, persons may be left to exercise their own good sense and judgment; but when the calling or profession or business is attended with danger, or requires a certain degree of scientific knowledge upon which others must rely, then legislation properly steps in to impose conditions upon its exercise. Thus, if one is engaged in the manufacture or sale of explosive or inflammable articles, or in the preparation or sale of medicinal drugs, legislation, for the security of society, may prescribe the terms on which he will be permitted to carry on the business, and the liabilities he will incur from neglect of them.” (Minneapolis Railway Co. v. Beckwith, 129 U. S. 26, 29, 9 Sup. Ct. 207, 208, 32 L. Ed. 585.)
*219Mr. Justice Gray, in Leisy v. Hardin, 135 U. S. 100, 10 Sup. Ct. 681, 34 L. Ed. 128, declared:
“The police power extends not only to things intrinsically dangerous to the public health, such as infected rags or diseased meat, but to things which, when used in a lawful manner, are subjects of property and of commerce, and yet may be used so as to be injurious or dangerous to the life, the health or the morals of the people. Gunpowder, for instance, is a subject of commerce and of lawful use, yet, because of its explosive 'and dangerous quality, all admit that the state may regulate its keeping and sale.” (Page 128.)
While this quotation is from a dissenting opinion, it is believed to be the statement of a proposition everywhere conceded to be true. Indeed the power of legislation to regulate the use and sale of dangerous, explosive and highly inflammable substances has been so widely exercised and so generally upheld that authorities are unnecessary.
An objection is made to this act because it requires that each can shall contain neither more nor less than twelve and one-half pounds. The sale in this case was of twenty-five pounds, so that the effect of a sale of a lesser quantity is not directly presented. The law, however, can not be held invalid for the reason suggested. The legislative power to restrict the sale to not more than the given quantity is not insufficient to declare that it shall not be less. A dangerous substance is to be introduced into a mine; safeguards are provided to reduce the danger to the smallest possible degree consistent with the proper execution of the work; the legislature has determined that twelve and one-half pounds in a can securely sealed is the quantity that will best promote the greatest" safety, at the least expense and inconvenience, and so best calculated to accomplish the intended purpose. It is not perceived how the court can say that it will not do this. Conceding the power to regulate, the wisdom of the regulation, unless clearly arbitrary or oppressive, must be upheld.
*220The provision requiring the can to be returned complete before another is taken was probably designed to prevent the further use of a receptacle that might not be properly sealed, and does not appear to be unreasonable. Its observance will manifestly tend to safety, which is the obvious purpose of the law. That-the package shall be'an original one may have been required for the reason that such a package would probably be better secured than would'be done by repacking, thus obviating the risk of imperfect work by-inexperienced hands. This and other regulations not specifically referred to here evince the legislative intent to promote safety in a hazardous business. The lives of the miners are of such deep concern to the state as to justify restrictions which, if only inconvenient or even burdensome, are valid if suited to promote this benign purpose.
.It is objected that these restrictions unlawfully interfere with the right of contract, and that the exception in the act concerning contracts previously made is an unlawful discrimination. If there is, however, a substantial connection between the purpose of the enactment and the regulations imposed, and the latter tend to the accomplishment of the object assumed, the fact that they do to some extent restrict the power to make contracts does not make them invalid.- (8 Cyc. 864; 22 A. & E. Encycl. of L. 938.) The usual police regulations concerning fire limits, regulations. for the storage-of gunpowder and for the sale of poisons, and laws concerning oleomargarin, intoxicating liquors and a multitude of other enactments are of this nature. The laws of congress relative to meat'inspection and the pure-food laws are recent illustrations of legislation of this character. All these rest upon the police power, which can not be abridged by private contract, and in the exercise of which mere private inconvenience must yield to public welfare.
“It is undoubtedly true, as more than once declared by this court, that the general right to contract in re*221lation to one’s business is part of the liberty of the individual, protected by the fourteenth amendment to the federal constitution; yet it is equally well settled that this liberty is riot absolute and extending to all contracts, and that a state may, without conflicting with the provisions of the fourteenth amendment, restrict in many respects the individual’s power of contract. Without stopping to discuss at length the extent to which a state may act in this respect, we refer to the following cases in which the question has been considered : Allgeyer v. Louisiana, 165 U. S. 578, 17 Sup. Ct. 427, 41 L. Ed. 832; Holden v. Hardy, 169 U. S. 366, 18 Sup. Ct. 383, 42 L. Ed. 780; Lochner v. New York, 198 U. S. 45, 25 Sup. Ct. 539, 49 L. Ed. 937.” (Muller v. Oregon, 208 U. S. 412, 421, 28 Sup. Ct. 324, 52 L. Ed. 551.)
This language is that of Mr. Justice Brewer, holding that a law regulating the hours of labor for women in factories, etc., which .was vigorously attacked because it restricted the right to contract in respect to their own labor, was valid. In Holden v. Hardy, 169 U. S. 366, 18 Sup. Ct. 383, 42 L. Ed. 780, a law regulating the employment of workingmen in coal-mines, assailed upon the same ground, was sustained. Thé court said:
“This right of contract, however, is itself subject to certain limitations which the state may lawfully impose in the exercise of its police powers. While this power is inherent in all governments, it has doubtless been greatly expanded in its application during the past century, owing to an enormous increase in the number of occupations which are dangerous, or so far detrimental to the health of employees as to demand special precautions for their well-being and protection, or the safety of adj acent property. While this court has held, notably in the cases [of] Davidson v. New Orleans, 96 U. S. 97, 27 L. Ed. 616, and Yick Wo v. Hopkins, 118 U. S. 356, 6 Sup. Ct. 1064, 30 L. Ed. 220, that the police power can not be put forward as an excuse for oppressive and unjust legislation, it may be lawfully resorted to ■ for the purpose of preserving the public health, safety or morals, or the abatement of public nuisances, and a large discretion ‘is necessarily vested in the legislature to determine not only what the interests of the public require, but what measures are neces*222sary for the protection of such interests.’ Lawton v. Steele, 152 U. S. 133, 136, 14 Sup. Ct. 499, 38 L. Ed. 358.” (Page 391.)
The final claim of the petitioner, that the act is in violation of the commerce clause of the federal constitution, may not be presented in this record, since the fact of the importation of the package from Missouri did not appear at the trial before the justice.' Our views upon this question, however, will be briefly given. The control of interstate commerce, committed to congress, does not prevent the state from making reasonable regulations designed primarily to promote the health and safety of its people,- although they indirectly affect the subjects of interstate commerce. The police power still remains with the states, and although it is difficult sometimes to trace the line where the legitimate exercise of such power ends, with reference to a particular subject, and that of congress begins, we believe that this particular law is safely within the recognized limits of state legislation. The supreme court of the United States has quite recently thus stated the rule in a case involving the cattle-inspection laws of this state :
“But though it may not legislate for the direct control of interstate commerce, the state may exercise any part of the legislative power which was not withdrawn from it expressly or by implication by the scheme of government put into operation by the federal constitution. It may sometimes happen that a law passed in pursuance of the acknowledged power of the state will have an indirect effect upon interstate commerce. Such a law, though it is essential to its validity that authority be found in. a governmental power entirely distinct from the power to regulate interstate commerce, may reach and indirectly control that subject.” (Asbell v. Kansas, 209 U. S. 251, 254, 28 Sup. Ct. 485, 52 L. Ed. 778.)
The same court, in a case involving the validity of a statute restricting the saie of cigarettes, said:
“We have had repeated occasion to hold, where state legislation has been attacked as violative either of the *223power of congress over interstate commerce or of the fourteenth amendment to the constitution, that, if the action of the state legislature were a bona fide exercise of its police power, and dictated by a genuine regard for the preservation of the public health or safety, such legislation would be respected, though it might interfere indirectly with interstate commerce. . . . We are therefore of opinion that although the state of Tennessee may not wholly interdict commerce in cigarettes it is not, in the language of Chief Justice Taney in the License Cases, ‘bound to furnish a market for it [them], nor to abstain from the passage of any law which it-may deem necessary or advisable to guard the health or morals of its citizens, although such law may discourage importation, or diminish the profits' of the importer, or lessen the revenue of the general government.’ ” (Austin v. Tennessee, 179 U. S. 343, 349, 350, 21 Sup. Ct. 132, 45 L. Ed. 224.)
This principle was affirmed in Plumley v. Massachusetts, 155 U. S. 461, 15 Sup. Ct. 154, 39 L, Ed. 223, in a case relating to the manufacture and sale of imitation butter. The court, adopting the language of an earlier case (Sherlock et al. v. Alling, Administrator, 93 U. S. 99, 103), said:
“In conferring upon congress the regulation of commerce, it was never intended to cut the states off from -legislating on all subjects relating to the health, life, and safety of their citizens, though the legislation might indirectly affect the commerce of the country. Legislation, in a great variety of ways, may affect commerce and persons engaged in it without constituting a regulation of it, within the meaning of the constitution. . . . And it may be said, generally, that the legislation of a state, not directed against commerce or any of its regulations, but relating to the rights, duties and liabilities of citizens, and only indirectly and remotely affecting the operations of commerce, is of obligatory force upon citizens within its territorial jurisdiction, whether on land or water, or engaged in commerce, foreign or interstate, or in any other pursuit.” (155 U. S. 473.)
In the opinion last cited the court also referred to and distinguished Leisy v. Hardin, 135 U. S. 100, 128, *22410 Sup. Ct. 681, 34 L. Ed. 128, cited and relied upon by the petitioner.
Many other authorities to the same import, state and federal, might be cited, but the foregoing are sufficient to indicate the views of the tribunal whose decisions must be accepted as final upon this question.
We do not find the act in question to be in conflict with the state or federal constitution. The petitioner is remanded.