BLAIR, C.
This is a proceeding under Sees. 3223-3225, R. S. 1909, to recover from the Chicago, Burlington & Quincy Eailroad Company accumulated penalties for abandoning a depot and station at Guinn, Missouri, without being authorized by the Board of Eailroad and Warehouse Commissioners so to do.
The trial court gave judgment for defendant and plaintiff appealed. In the answer it is averred that ■the statute under which the action was instituted denies defendant the equal protection of the laws, de*513prives it of its property without due process of law and impairs the obligation of its contract with one Dean who, the petition alleges, in 1887 conveyed certain land to defendant’s predecessor in title in consideration of the erection of a depot on the line of railway now owned and operated by defendant.
In the view we take of the case there is but one question it is necessary to discuss. State and Federal Constitutions guarantee defendant the equal protection of the laws and the right to such protection it is necessary to maintain. The first section of the act the constitutionality of which is drawn in question in this case reads as follows:
“Sec. 3223. Depots to be maintained at agreed places. — Where the right of way- for the construction of a railroad has been granted over and across any tract or tracts of land in this State, or any donations made to and accepted by any railroad corporation in consideration of the location of a depot at a specified place upon such railroad, and such depot has been constructed at' the place so agreed upon and a postoffice has been established there and a village or town built at said place, it shall be the duty of the company managing and operating any such railroad (whether it be the original corporation to which said grant or donation was made, or a corporation succeeding to the rights of such original company) to keep and maintain a depot in charg'e of a resident agent at said place or places, and to furnish all proper and suitable facilities for the shipment of freight and the transportation of passengers to and from said station. ’ ’
The second section provides that before abandoning a depot of the class defined, a hearing must be had before the Board of Eailroad and Warehouse Commissioners and an order permitting the abandonment secured. It is also provided thát the liability of the *514company to the donor of right of way, etc., shall not be affected by the act. The third section prescribes heavy penalties for abandoning a depot without complying with the provisions of the second section, authorizes an action tc recover such penalties and empowers the court to allow an attorney’s fee in case of a recovery.
It is to be observed that though a depot has been erected at a given place, a postoffice established and a village or town built there, the act is yet inapplicable unless there is present one further element, i. e., the depot must be one which has been erected in consideration of a donation of lands to the railway company. The constitutional prohibitions against class legislation and the denial of equal protection of the laws in no wise deprive the Legislature of all discretion in the matter of defining the classes to which its enactments shall apply, and it is only when the classification attempted is arbitrary, unreasonable and unjust that these constitutional provisions inhibit such legislative action. The Legislature’s broad discretion with respect to the classifying of persons and objects for the purposes of legislation is not at all subject to revision by the courts, however unwisely it may seem to have been exercised in an occasional particular instance. When, however, it clearly and .beyond a reasonable doubt appears that the legislative power has been transcended and that a particular act arbitrarily, unjustly and unreasonably marks particular persons or things as the objects of burdensome legislation and exempts therefrom others of the same natural class it is necessary to point out that fact and give to the constitutional provisions in question their intended effect. It is settled law that a classification for legislative purposes “must always rest upon some difference which bears a reasonable and just relation to the act in respect to which the classification is proposed, and can never be made arbitrarily and *515without any such basis” (Gulf, Colorado & Santa Fe Railway Company v. Ellis, 165 U. S. 150; Billings v. Illinois, 188 U. S. 97; State v. Loomis, 115 Mo. l. c. 314; Powell v. Sherwood, 162 Mo. 605; State v. Gregory, 170 Mo. l. c. 604, 605 ; State v. Cantwell, 179 Mo. l. c. 265; State v. Tower, 185 Mo. l. c. 94; State v. Swagerty, 203 Mo. l. c. 523; State ex inf. v. Standard Oil Co., 218 Mo. l. c. 369) and, also, that the distinction Ob'served in marking the boundaries of the class to which the resulting enactment shall apply must be one which “is not arbitrary, hut rests upon some reason of public policy growing out of the condition of the business of such class” (State v. Swagerty, supra, l. c. 524, 525, and cases cited); it “must he grounded upon a reason of a public nature” (Brady v. Mattern, 125 Ia. l. c. 163; Kane v. Erie R. Co., 67 C. C. A. l. c. 658) and “must he of such a nature as to mark the objects thus designated as peculiarly requiring exclusive legislation” and “as will, in some reasonable degree at least, account' for or justify the restriction of legislation.” [State ex rel. v. Hammer, 42 N. J. L. 440.] The soundness of these principles is undenied and logically undeniable and it remains to compare the act in question with the standard they fix. It is unquestionably within the competency of the Legislature to enact laws applicable to railroads as a distinct class and it is undoubtedly true that when ■ a depot has been erected and opened to the public and a town or village built at the place, the Legislature might constitutionally interpose restrictions upon the removal of the depot and require, as a prerequisite thereto, the submission of the question as to the propriety of such removal to investigation by the Railroad and Warehouse Commission or other competent tribunal. Its right to thus limit the power of railroad companies to remove depots under the circumstances mentioned arises out of its power to enforce the duty of such companies to provide and maintain facilities adequate *516for the public needs and the distinctive facts recited would certainly afford sufficient basis for the enactment of legislation of the kind referred to, applicable to the class of depots marked out thereby. Such a classification would clearly rest upon a distinction of a public' nature, would create, in effect, but a rule of evidence casting upon the railroad company the burden of proving the lack of necessity for a depot at such a place (People ex rel. v. Board of Railroad Commissioners, 158 N. Y. 421), and would operate alike upon all railroads in the State in every case which the reason of the situation affected. The act under consideration, however, goes further. Out of the class mentioned it selects a part only, and to that part alone is applicable, the line of severance depending upon whether the depot affected was erected in consideration of a donation of land to the company. What just relation does the consideration for land on or near which the depot is located bear to the object of legislation of this kind? How can it be said in any sense to be. relevant to the question whether the public needs at the place are such as to require the maintenance there of a depot? As between themselves the act leaves the donor and the donee company exactly where they were, so far as concerns the former’s right to damages for the removal of the depot. The penalty prescribed, if collected, necessarily goes to the school fund and not to the donor. The act arbitrarily selects those railroads which have erected depots in compliance with an agreement to erect them in consideration of donations but exempts from its application all other roads despite the fact that the distinction observed is grounded on no reason of a public nature and bears no relation to the reason for the enactment of legislation relative to the removal of depots, i. e., the need of the public for depot facilities at the place affected. To thus subject a part of a natural class of persons op corporations to burden*517some penalties, restrict their freedom of action and leave others of the same class unburdened and unrestricted, constitutes such a denial of the equal protection of the laws, such an arbitrary, unreasonable and unjust classification as to invalidate the act by which these things are attempted. Of course it is not possible to eliminate the objectionable qualification since we have no power to extend, by such construction, the scope of the statute and make it applicable to those to whom the Legislature never intended it should apply. [State ex rel. v. Railroad, 195 Mo. l. c. 250.] We have no recourse but to hold the act, in its present form, invalid and affirm the judgment of the trial court.
Roy C., concurs.
PER CURIAM.
The foregoing opinion of Blair, C., is adopted as the opinion of the court.
All the judges concur.