The question involved here is whether the provisions of the oil-inspection law contravene either the federal or state constitutions. The provisions of that act, so far as they may be germane to the determination of this question, are as follows: Section 850 of the General Code requires each owner of oil inspected to pay certain fees, graduated according to the amount inspected, ranging from a fee of fifty cents for single packages or barrels to seven cents per barrel of fifty gallons in lots exceeding fifty barrels.
*300Section 853 requires the inspector to pay into the state treasury the moneys received after payment of salaries of himself and deputies and such .other expenses incident to the conduct of his office. The inspector and stenographer are paid stated salaries and the deputies fees of three cents for each barrel inspected, but not to exceed $1,200 per annum for each deputy in any one year.
Sections 854 and 865 provide that, before being offered for sale to customers for illuminating purposes, petroleum oils or products of which petroleum is a constituent element shall be inspected, whether manufactured in this state or not. Likewise gasoline, petroleum-ether and like substances having a lower flash test than illuminating oils must be inspected whether manufactured within or without the state, for which the same fees are charged as for the inspection of oils and which are likewise paid into the state treasury. The statutory test for oils, gasoline, etc., is a flashing test of 120 degrees Fahrenheit.
Other sections of the act provide for the inspection of oils shipped in tank cars, which may be inspected either at the refinery where manufactured, if within the state, or at the distributing station where shipped, at the discretion of the inspector.' Other sections of the act provide penalties for violations of its provisions.
Assuming that the inspection act violates either the federal or state constitutions, the plaintiff, under the allegations of this amended petition, would be entitled to relief. He states that he is engaged at Cleveland, Ohio, in dealing com*301mercially in petroleum oil and its products, and buys large quantities of such oils, gasoline and naphtha from the refineries in Pennsylvania and elsewhere, and that the defendant has charged arbitrarily large fees grossly in excess of the expense of the inspection. The plaintiff is seeking relief against the defendant as a ministerial officer of the state, whom he claims is acting under an unconstitutional law to the detriment of his business.
That a complainant may have relief by injunction in such a case against an officer of the' state has been repeatedly decided. Louisiana v. Jumel, 107 U. S., 711, 758; In re Tyler, 149 U. S., 164; Smyth v. Ames, 169 U. S., 466.
It is contended by plaintiff that the enactment of the oil-inspection law was not a valid exercise of the police power, and that it contravenes the fourteenth amendment of the federal constitution. That state legislatures may enact laws for inspection or regulation, in relation to petroleum oils or its products, is not now open to question. So long as congress has not invaded the field of regulation or inspection this power is reserved in the state. It has the exclusive right to determine the necessity, policy and wisdom of requiring inspection in the interest of public safety. That kerosene oil, as now manufactured, may be nonexplosive is not vital. The fact that such may or can be manufactured or sold in dangerous forms is vital. For the same reason there is no force in the allegation of the amended petition that it is not a proper exercise of the police power for the reason that danger *302to life and property from the proper use of illuminating oils, gasoline and naphtha has not existed for years. The legislature had a right to consider the fact that there might be danger from improper use. Substantially similar reasons were plead in the bill filed in the case of Red “C” Oil Mfg. Co. v. Bd. of Agriculture of North Carolina, 222 U. S., 380, 383, but the law was upheld there as a proper exercise of the police power (s. c. 172 Fed. Rep., 695).
The amended petition discloses that, especially in the later reports of the state inspector, the fees for gasoline inspected were largely in excess of the fees collected from the inspection of oils; that without the gasoline inspection features, in such an event, there would be no appreciable excess of revenue over the expense of operation, in the inspection of petroleum oil products. Counsel for the inspector therefore intimate that the sections of the law relating to oils and gasoline are separate and distinct, and that therefore the oil-inspection receipts would substantially equalize the expense of the inspection department, and thus would be a valid enactment.
The adoption of this view, of course, would nullify that part of the act relating to the inspection of gasoline, petroleum-ether and like products for the obvious reason that the treasurer would thus receive about $320,000 for gasoline receipts without a dollar’s outlay for expense, which, in such view, would be charged entirely to oil inspection.
*303This view of the law cannot be maintained. While the legislative history relating to inspection does not show that originally the inspection of oils was provided for, on May 9, 1908, the general assembly revised its entire inspection laws on the subject, providing for the inspection of petroleum and gasoline in the same act. No separation of those products was made, but each was made subject to the same laws, charged with the same fees, and the commingled receipts required to be paid into the state treasury. It is impossible, therefore, to regard the act as a separate and distinct act and severable, and the inspection features must either fall or stand as a single pronouncement of legislative intent.
The allegations of the amended petition disclose an increasing yearly net revenue in the operative effect of the inspection law. A law may be within the pale of constitutional authority when originally passed, yet because of its future operations it may directly contravene the organic law. As stated by Mr. Justice Harlan, in Minnesota v. Barber, 136 U. S., 313, 319, “There may be no purpose upon the part of a legislature to violate the provisions of that instrument, and yet a statute enacted by it, under the forms of law, may, by its necessary operation, be destructive of rights granted or secured by the constitution. In such cases, the courts must sustain the supreme law of the land by declaring the statute unconstitutional and void.” To the same effect are Brimmer v. Rebman, 138 U. S., 78, and Poindexter v. Greenhow, Treas., 114 U. S., 270.
*304Article I, Section 10, clause 2, of the Federal Constitution provides: “No state shall, without the consent of the congress, lay any imposts or duties on imports or exports, except what may be absolutely necessary for executing its inspection laws.”
As heretofore stated, the facts admitted by the demurrer are that the receipts from inspection have been more than double the necessary disbursements for costs and expenses from 1907 to the present year. In that time the excess in receipts over disbursements has been $395,876, and the yearly net revenues are continually increasing. Though not a part of the record, I may be permitted to add that the report of the state inspector for the current year of 1914, just filed, shows a net surplus of $99,444.08 under this act. Under these circumstances the court feels warranted in holding that the resultant operation of the law is in direct and flagrant conflict with the federal constitution. We are not unmindful of the fact that if properly exercised the legislative purpose, in laying inspection duties, cannot be inquired into, and that, ordinarily, the amount of the inspection fee is not a judicial question; but it may be subject to judicial attack if the inspection charges are so unreasonable and disproportionate to the service rendered as challenge the good faith of the law, or where it is made clearly to appear that they are obviously and largely beyond what is needed to pay for the cost of inspection. D. E. Foote & Co. v. Stanley, Comp, of the State of Maryland, 232 *305U. S., 494; New Mexico, ex rel., v. Denver & Rio Grande Rd. Co., 203 U. S., 38.
It is not necessary that the legislature determine with exact nicety the amount of the inspection charges required to carry its purpose into execution. This is manifestly impossible owing to the varying fluctuations of trade. Mere excess in net surplus revenues is of itself no warrant in disturbing the law, nor would we feel disposed to hold that a flagrant excess in a single year over the expenses would invalidate it. What we do hold is, that under the facts disclosed here, where it appears that the fees are not only excessive but are being continued, yielding each and every year increasing net revenues, the natural operative effect of the inspection act thus shown is in direct violation of Article I, Section 10, of the United States Constitution, and consequently void. D. E. Foote & Co. v. Stanley, Comp. of the State of Maryland, supra.
The majority members of the court of appeals, in sustaining the demurrer to the amended petition, relied chiefly upon the case of Red “C” Oil Mfg. Co. v. Bd. of Agriculture of North Carolina, supra. In that case Chief Justice White quoted a dictum in Patapsco Guano Co. v. North Carolina Bd. of Agriculture, 171 U. S., 345, 354, as follows: “If the receipts are found to average largely more than enough to pay the expenses, the presumption would be that the legislature would moderate the charge.”
Both cases are easily distinguishable from the present one. In the Red "C” Oil Mfg. Co. case the *306complaining party filed his bill two days after the inspection law took effect, and while the bill alleged that the tax was more than double the cost of inspection, the complaint was purely speculative. The defense of the board of agriculture, as disclosed by the answer in that case, was that the complaint was premature and that one year’s test of the law would show the exact amount of receipts and cost of- operation. It was upon these features of the case that the dictum named was based.
The defendant attempts to escape the effect of D. E. Foote & Co. v. Stanley, Comp, of the State of Maryland, supra, by the claim that the Ohio act does not interfere with interstate commerce; that the act imposes a charge upon oils, etc., that are sold in this state only, ,and that after products have been imported into Ohio by tank cars or otherwise they have then assumed a state of rest as intrastate commerce and may be taxed without violation of the federal provision. This is too narrow a construction of the facts pleaded and of the scope of the Ohio act. The act is not in terms made to apply to intrastate products, but applies generally to any and all oils, gasoline, etc., “whether manufactured in this state or not.” The language employed would require inspection of products shipped into the state, and the features of the inspection would necessarily, though indirectly, impose a burden upon interstate commerce. The amended petition alleges that the plaintiff, though a dealer in Cleveland, Ohio, buys large quantities of those products in Pennsylvania and elsewhere, and has contracts and arrangements for such sup*307plies. The general language used in the Ohio act is substantially similar to the North Carolina act in the Red “C” Oil Mfg. Co. case, supra, and to the Maryland inspection law, declared void in D. E. Foote & Co. v. Stanley, Comp, of the State of Maryland, supra. That inspection laws of this character impose a burden on commerce from other states, see Brimmer v. Rebman, supra.
Neither can the claim be sustained, under the allegations of the amended petition, that the products inspected under the act could be considered as having been incorporated with the general mass of property in the state and thus have lost their distinctive character as imports, and so become products of intrastate commerce. The fact is that Castle, at Cleveland, Ohio, was dealing directly with shipments .of oil from Pennsylvania, and the products he received as such purchaser must, of necessity, have been shipped to him in original packages, which were required to be inspected before sale. So that neither the amended petition nor the inspection act can be susceptible to such a construction as would apply its provisions to packages which had become intrastate. May & Co. v. New Orleans, 178 U. S., 496.
We are, therefore, constrained to hold that the inspection act necessarily operates and imposes a burden upon commerce from other states, and that in so far as the same affects such commerce it violates the federal constitution and is unconstitutional and void for the reason that it imposes a burden on such commerce largely in excess of the expense necessary for inspection.
*308In view of the conclusions which we have reached, we do not regard it necessary to pass upon the other questions presented.
Judgment of the court of appeals reversed, and 'cause remanded to that court with instructions to overrule the demurrer to the amended petition, and for further proceedings according to law.
Judgment reversed, and cause remanded.
Nichols, C. J., Johnson, Donahue, Wanamaker, Newman and Matthias, JJ., concur.