
222 U.S. 415 (1912)
WILLIAMS
v.
WALSH, SHERIFF OF CRAWFORD COUNTY, KANSAS.
No. 79.
Supreme Court of United States.
Argued December 5, 1911.
Decided January 9, 1912.
ERROR TO THE SUPREME COURT OF THE STATE OF KANSAS.
*416 Mr. Charles Blood Smith, with whom Mr. D.B. Holmes was on the brief, for plaintiff in error.
Mr. John S. Dawson, Attorney General of the State of Kansas, Mr. S.N. Hawkes, Mr. F.S. Jackson and Mr. O.T. Boaz for defendant in error, submitted.
*418 MR. JUSTICE McKENNA delivered the opinion of the court.
A statute of Kansas provides as follows (Laws 1907, c. 250):
"It shall be unlawful for any individual, firm or corporation to sell, offer for sale or deliver for use at any coal mine or mines in the State of Kansas, black powder in any manner except in original packages containing twelve and one-half pounds of powder, said package to be securely sealed; said powder to be delivered by the company to the miner at its powder-house, not more than three hundred *419 feet from pit-head, unless hereafter otherwise provided by contract; provided, however, this act shall not be construed as in any manner conflicting with any existing contract of sale of black powder."
Plaintiff in error was convicted of violating the statute by selling and delivering to one John Thomas black powder which was not in an original package of 12 1/2 pounds securely sealed, there being no existing contract to sell between the parties. He was condemned to pay a fine of $50 and the costs of the case, and stand committed to the county jail until he should pay the fine or be discharged by law.
In a petition to the Supreme Court of the State in habeas corpus to be discharged from custody he alleged the illegality of his conviction and that the statute was null and void because in conflict with the Fourteenth Amendment to the Constitution of the United States and the commerce clause, and also with the constitution of the State of Kansas.
His contentions were not sustained, and he was remanded to custody. 79 Kansas, 212.
Some of the contentions which were made in the state court are abandoned here. "We admit," counsel say, "that the Kansas legislature had the right to determine that the local conditions in the State required that black powder should not be sold and delivered for use in any coal mines in the State except in packages containing exactly twelve and one-half pounds, no more nor less; that precisely that amount of powder was required to be sold to protect the miners that are employed in the coal mines of the State, and that the mere fact that courts or judges may differ as to the wisdom of such legislation would afford no ground for judicial interference, unless the question was in excess of legislative power." It is, however, insisted that there is a limitation of the power of the State, and that the law in question transcends the power of the *420 State in that (1) it denies to plaintiff in error and other citizens the equal protection of the laws, and (2) is in conflict with the commerce clause of the Constitution of the United States.
We shall consider these objections in their order:
(1) The discriminatory effect of the statute comes, it is urged, from its first section, which directs that it shall not be construed to conflict with existing contracts. "The act thus recognizes," it is said, "the fact at the time it took effect, May 27, 1907, of the existence of contracts" for the delivery of powder in other than the described packages. "It is thus made unlawful," it is said, "for some persons to sell or buy black powder otherwise than in twelve and one-half pounds in original sealed packages, while others may lawfully do the same thing."
We might, indeed, hesitate to assume, as counsel does, from the possibility of the existence of a fact, its actual existence, if by doing so we should have to regard a state law as unconstitutional, but as we do not think the result will follow, we shall assume the existence of the fact. The purpose of the statute is to provide for the safety of coal mining operations, and if it may be said that whatever danger can come from packages of powder will come from them regardless of the date of the contract under which they may be delivered, there are nevertheless other considerations to be taken into account. The statute is criminal. A retrospective operation of it was to be avoided, might indeed be illegal. At any rate, it was a matter properly to be considered by the legislature in distinguishing between contracts made before the passage of the law and those made after its passage. The former might not be numerous, their evil would be temporary; and certainly legislation which makes acts criminal which are done after they are forbidden, and assigns no penalties to acts done in pursuance of obligations legally incurred, is not arbitrary classification. It is not necessary to do more than *421 repeat what we have said many times, that a classification which is not arbitrary is not repugnant to the Constitution of the United States. We may add that "the Fourteenth Amendment does not forbid statutes and statutory changes to have a beginning, and thus discriminate between the rights of an earlier and later time." Sperry & Hutchinson Co. v. Rhodes, 220 U.S. 502, 505.
(2) To make good the contention that the statute of Kansas offends the commerce clause of the Constitution, plaintiff in error refers to an amendment to his petition that the powder sold and delivered by him was enclosed in an original unbroken package, containing twenty-five pounds of powder, imported from the State of Missouri by the Central Coal and Coke Company, of which company he was the agent and representative in selling and delivering. And it is further alleged that black powder has been and is put up by manufacturers thereof, and sold and transported among the States in original packages containing twenty-five pounds.
It is, however, admitted that proof of such facts was not attempted to be made in the justice's court. The case was submitted in that court upon a stipulation that the powder, at the time of its sale and delivery, was not "in an original package, containing twelve and one-half pounds, securely sealed, and that then and there, there was not an existing contract for the sale of black powder, to be used in said mine."
Plaintiff in error insists that the absence of proof of the facts which he alleges is immaterial because, as he urges, "this court will take judicial notice of the matter of common knowledge that black powder is a subject of interstate commerce." But plaintiff in error invokes a broader knowledge, or, rather, a broader knowledge is necessary to sustain his allegations. We must not only take notice that black powder is a subject of interstate commerce in packages of twenty-five pounds, but of the more particular *422 facts that he was the agent and representative of the Central Coal and Coke Company in selling and delivering the powder, and that the company had imported it in the package in which it was sold. What sources of knowledge have we of such facts? It is true that the stipulation recited that Thomas' purchase of the powder was voluntary, and that it was sold to him "in the usual and ordinary course of business." Of what business, and whose? It will be observed that the stipulation merely negatives the requirements of the statute. It follows the complaint, and states that the powder was not sold in an original package containing twelve and one-half pounds, and that there was not an existing contract. How it was sold is not stated. It is true the Supreme Court supplied the omission as to quantity. In answering an objection (the objection is not made here) that the law was invalid on account of its rigid requirement that a package should contain twelve and one-half pounds, neither more nor less, the court stated that the sale in this case was of twenty-five pounds. The court went no farther, and of the contention that the statute was repugnant to the commerce clause of the Constitution said (p. 222): "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." It was certainly within the competency of the court to refuse to consider the contention. The validity of the judgment against plaintiff in error could only be determined by the defense he made, not by the defense he might have made, and which he did not even offer to make. We have often said that the writ of habeas corpus cannot be made to perform the office of a writ of error. It certainly cannot be made the means of obtaining a new trial.
It may, however, be said that the Supreme Court expressed *423 its views of the validity of the Kansas statute under the commerce clause of the Constitution and thereby ruled on the contention of plaintiff in error based on that clause. We do not so understand the opinion of the court. It in no way, nor to any extent, modified its view that the contention was not available to plaintiff in error or intimated that such view was not the basis of its decision.
Plaintiff in error, apprehending this, declares that it is immaterial whether the package of powder sold by him was imported, and insists that the act must be held to be void because it must be considered "as applicable to importations of black powder from other States." The words "original packages" used in § 1 of the statute had, it is said, "a technical meaning well known to the members of the Kansas legislature." In definition of the meaning of those words plaintiff in error cites certain familiar decisions of this court, and, from the definition given in them of "original packages," deduces the conclusion that the words were used in the same sense in the Kansas statute, and hence that the statute must be held as designed to prohibit importations of black powder in other than 12 1/2-pound packages. We are not impressed by the reasoning. The act does not deal with importations, special or general, but only with sales within the State at a specified place, and the delivery at such place of the powder sold in other than a prescribed quantity and in a prescribed package. It may be that powder is imported or put up in the State in such packages. If so, it makes compliance with the law all the easier. Or it may be that the seller may compose the package, securing its integrity in the manner provided by the statute. What the Supreme Court of the State may decide in that regard we do not know, for the point was not made in that court, and the interpretation of the statute invoked.
There is another answer to the contention. A law cannot be declared invalid at the instance of one not affected *424 by it, and, as we have seen, there was no proof before the justice of the peace that plaintiff in error was an importer of powder. We do not wish to be understood as intimating that if such proof had been made it would have been a defense. Powder is an explosive, dangerous to handle, the degree of danger corresponding to its quantity. It is subject, therefore, to a measure of regulation from which harmless articles of commerce may be exempt. It is said by this court in Nashville &c. Ry. Co. v. Alabama, 128 U.S. 96, 100: "Indeed, it is a principle fully recognized by decisions of state and Federal courts, that wherever there is any business in which, either from the products created or the instrumentalities used, there is danger to life or property, it is not only within the power of the States, but it is among their plain duties, to make provision against accidents likely to follow in such business, so that the dangers attending it may be guarded against so far as is practicable." See further on the same principle, Foster v. Kansas, 112 U.S. 201, 206; Plumly v. Massachusetts, 155 U.S. 461; Austin v. Tennessee, 179 U.S. 343; Asbell v. Kansas, 209 U.S. 251.
Judgment affirmed.
