Tbe A. C. L. Railroad, originally tbe "Wilmington and Weldon Railroad Company, occupies with its track tbe chief street of tbe city of Goldsboro. Its right of way, 65 feet on each side of its roadbed, embraces tbe whole of what is known as East and West Center streets, which extend north *358and south, the entire length of the city. The right of way was originally acquired about 1835, and the town has been built up on either side and became incorporated in 1847. The city of Goldsboro under the authority of the powers granted in its charter has instituted a system of grading its streets and of drainage extending through the city. In pursuance of this work the roadbed of the railroad on Center Street in some places is now 6 inches and from that to 18 inches higher than the grade of that street and of the other streets of the city which cross East and West Center streets at right angles.
The city authorities have passed an ordinance providing that “all railroad companies owning tracks on East and West Center streets, between Walnut and Nine streets in said city of Golds-boro, are hereby required to lower said tracks so as to make the same conform to the grade line of said streets and said tracks to be filled in between rails; the grade line of said street being as follows: Beginning at the present grade line comer of Walnut and East and West Center streets, to be lowered 6 inches to corner of Mulberry and East and West Center streets, 10 inches to corner of Ashe and East and West Center streets, and 18 inches to corner of Yine and East and West Center streets.” Another section of the ordinance provides that failure or refusal to comply with the ordinance should be a misdemeanor and fined $50. The plaintiff attacks this ordinance as being unconstitutional and void, and seeks to enjoin all enforcement of the ordinance by a criminal proceeding.
The city has heretofore graded and paved at its own expense said East and West Center streets outside of that part of the streets occupied and used by the defendant as its roadbed. The injunction was refused and the plaintiff appealed.
The city has from time to time laid out numerous streets crossing said right of way and has worked and maintained its streets and cross streets for more than 60 years, including all of East and West Center streets outside of the actual space occupied by plaintiff’s roadbed.
As a general rule, a court of equity has no jurisdiction to restrain a State from prosecuting for a violation of its statutes and ordinances. The ordinances in question were made by the *359city in pursuance of its governmental authority. We need not enter into the learned and elaborate discussion as to what cases, if any, present exceptions to this general rule, for we are of the opinion that the ordinance requiring the plaintiff to lower its track from 6 to 18 inches at the points where the cross streets pass over the railroad track is a legal exercise of the public authority vested in the defendant.
The plaintiff took its charter expecting that towns and cities would grow up along the line of its road, and knowing that with the development of the country new roads and, in the cities and towns, that new streets would be laid out across its right of way. And it took its charter knowing, too, that the State would have the right to lay out such roads and new streets, and to require the railroad to make such alterations as would prevent the j>assage over its track by the public being impeded.
In English v. New Haven, 32 Conn., 241, it was held that the city had the right to require the railroad company to widen the crossing of a street over its track or to make such other changes as the public convenience and necessity might require in order that there should be no hindrance to- the public in crossing the railroad track. In R. R. v. Bristol, 151 U. S., 556, it was held that the imposition upon a railroad company of the entire expense of a change of grade at a railroad crossing is not a violation of any constitutional right.
In Cleveland v. Augusta, 102 Ga., 233, 43 L. R. A., 638, the subject is fully discussed in a very able opinion which holds that a railroad corporation must make such alterations in .the change of its grade as will conform to the new grading of the streets adopted by the city. In R. R. v. Duluth, 208 U. S., 583, it was held that “The right to exercise the police power is a continuing one, that cannot be limited or contracted away by the State or its municipality, nor can it be destroyed by compromise, as it is immaterial upon what consideration the attempted contract is based. Such power when exercised in the interest of public health and safety is to be maintained unhampered by contracts and private interests; hence, an ordinance by a city compelling a railroad to repair a viaduct constructed after the opening of a road is valid, though the city for a sub*360stantial consideration bad contracted to relieve tbe railroad company from making sucb repairs for a term of years.”
In tbe present case, however, there was no contract exempting tbe railroad from changing its grade at sucb crossings when required. Indeed, section 27 of plaintiff’s charter, in tbe Laws of 1833, expressly requires tbe plaintiff to' do what tbe city now requires. Said section provides: “It shall be lawful for tbe said railroad company in tbe construction of its said road to intersect or cross any public or private way established by law; and it shall be lawful for them to run their road along tbe route of any sucb road: Provided, whenever they intersect and cross sucb public or private road tbe president or directors shall cause tbe railroad to be so constructed as not to impede tbe passage of travelers on said public road or private way aforesaid'.” In Minneapolis v. R. R., 98 Minn., 380, 28 L. R. A. (N. S.), 307, tbe Supreme Court of Minnesota held that an almost identical provision in tbe charter of a railroad company was as applicable to new public roads laid out across tbe right of way as it was to old roads over which tbe right of way ran, and said: “Tbe purpose of incorporating this particular provision in tbe charter of tbe railroad company was in tbe interest of tbe public and to require tbe railroad company to keep in good repair all crossings at tbe intersection of highways. . . . Tbe evils intended to be guarded against are tbe same, and apply equally to both new and old streets. There was no reason why tbe Legislature should deem it prudent to provide for existing highways only, and we do no violence to tbe rules of statutory construction in bolding that the provisions of defendant’s charter were intended to include all streets and highways intersected by railroads, whether laid out before or after building of tbe railroad. Tbe expression of tbe statute is special, perhaps; but tbe reason therefor is general. Tbe expression must therefore be deemed general. A railroad company accepts and receives its franchise subject to tbe implied right of tbe State to lay out and open new streets and highways over its tracks, and must be deemed, as a matter of law, to have bad in contemplation at tbe time its charter was granted, and is bound to assume, all burdens incident to new as well as *361existing crossings.” The same doctrine has been held in Maine, Connecticut, Illinois, New York, Tennessee, Indiana, Texas, Mississippi, Ohio, Nebraska, New Jersey, Vermont. Wisconsin, and by the United States Supreme Court. Indeed, the above case from Minnesota was affirmed, 214 U. S., 491.
In the above-cited case of Cleveland v. Augusta, 102 Ga., 233, 43 L. R. A., 638, the railroad ran across the public road, which was not then a street. When the territory was taken into the city its authorities changed the road to a street and raised the grade at that point, and required the railroad to raise its grade. This the railroad refused to do unless the city would pay the expense. The Court held that the railroad company was liable for the expense of raising its roadbed to conform to the city grade, and said that it must yield to the reasonable burden imposed by the growth and development of the country or the city, and where the public welfare demands a change of grade of the highway or street, the railroad company must, at its own expense, make such alterations in the grade of its crossings as will conform to the new grade. That case is exactly in point.. In the course of its opinion the Court said: “Upon streets or highways crossed by it, or subsequently laid out, the railroad company must construct proper crossings (Lancaster v. R. R., 29 Neb., 412; R. R. v. Smith, 91 Ind., 119, 13 Am. and Eng. R. R. Cases, 608) ; and must alter, change, or otherwise reconstruct such crossings whenever the public welfare demands. Eng. v. New Haven Co., 32 Conn., 240.” The doctrine is further clearly stated thus by the Court: “When the railroad company laid its track across the highway, it did so subject to the right of the public authorities to malee such alterations or changes in the highway, either by lowering or raising the grade, widening or otherwise improving the same, as the public safety and welfare might require. In doing so, the presence of the railroad necessitates a certain character of crossings and safeguards which otherwise would not exist; and with however much plausibility it might be argued that the public authorities should be required to do just such work as they would have to do did the railroad not exist, it is certain that the railroad company should bear the burden of such work as *362is made necessary by reason of the peculiar and dangerous character of its operation. The principle of the common law is embodied in this statute. It is the railroad which makes the construction of a railroad crossing necessary, whether the highway be laid out before or after the construction of the railroad.”
In R. R. v. Minn., 208 U. S., 583, it is said: “As the Supreme Court of Minnesota points out in its opinion, 98 Minn., 380, the State courts are not. altogether agreed as to the right to compel railroads without compensation to construct and maintain suitable crossings at streets extended oyer its right of way after the construction of the railroad. The great weight of State authority is in favor of such right. See cases cited, 98 Minn., 380. There can be no question as to the attitude of this Court upon this question, as it has been uniformly held that the right to exercise the police power is a continuing one, that it cannot be contracted away, and that a requirement that a corporation or an individual comply with reasonable police regulations without compensation is the legitimate exercise of the power and not in violation of the constitutional inhibition against the impairment of obligations of contract.” Here, the city in pursuance of its right, has graded the streets of the city and put in a system of drainage, both of which are impeded by the railroad maintaining its roadbed on Center Street from 6 to 18 inches above the level of the streets crossing it, its roadbed extending through the entire length of the city on this main street.
The plaintiff earnestly contends that, inasmuch as Rev., 1097 (10), authorized the Corporation Commission to require the raising or lowering by a railroad of its track or highway at any crossing and to designate who shall pay for the same, this deprives the city of Goldsboro of the right to exercise its police power in that regard. The provision just cited giving the Corporation Commission the power stated is not in derogation of that conferred in the charters of towns and cities, but is supplementary merely.
The plaintiff also contends that Rev., 388, providing that no1 railroad company, etc., shall be barred by the statute of *363limitations as to its right of way, etc.,.by occupation of the same by any person whatever, deprived the city of the right there claimed. This is a misconception. The defendant is not contending for the ownership of the soil of East and West Center streets. It is merely asserting its right to require the railroad company to change the grade of its roadbed where it is crossed by the other streets so that public travel and the drainage of the city may not be impeded.
A further ordinance of the city prohibits the railroad from doing any “shifting on East and West Center streets between Spruce and Ash at any other time than hours of 6:30 and 8 :30 A. M. and from 4:30 to’ 6 :30 P. M. or to allow any car to stand for a longer period than 5 minutes at any point on East and West Center streets between Spruce and Ash, under a penalty of $50 for each offense. East and'West Center streets constitute the main street of the town, and that portion of it between Spruce and Ash — four blocks — is the very heart of the city. In a former action, in which the plaintiff in this case was a defendant, Deway v. R. R., 142 N. C., 392, the plaintiff herein, which was the defendant in that action, alleged in its answer as follows: “The operation of the trains along said Center Street increases annually and the danger accordingly; trains are constantly passing and the crossings, notwithstanding the utmost diligence and care on the part of the railroad, are necessarily blocked. Said Center Street is the main business street in the city; it is frequently crowded with pedestrians and vehicles, and the operation of so many trains daily throughout the length of said street is fraught with danger to life and j>rop-erty.”' This statement, admission, and averment of the plaintiff herein, made under oath, is set up in answer in this case, in which an injunction is sought, and it is admitted in the reply.
We understand the ordinance, in forbidding “shifting” within the limited space of four blocks, on the main street in the center of the town, to refer to what is commonly understood by that expression, to wit, the “cutting out and putting in” cars in the making up of a train before it is dispatched on its journey. Such a regulation certainly cannot be held void, and is a reasonable exercise of the police power necessary for the convenience *364and safety of tbs public at tbs four crossings designated. "Whether such ordinance would be reasonable in smaller towns is a question not before us.
We certainly do not understand the term “shifting” to refer to the “transfer” of a train of cars already made up and to be delivered by the plaintiff company to another railroad company to be transported. The ordinance does not apply to the transfer of a car or cars from one railroad to another through the city. Whether an ordinance forbidding the transfer of the cars from one railroad to another through said street except at specified hours would be reasonable, in view of the fact that at Goldsboro such ears can be transferred by way of the physical connection of the tracks óf all the railroads on the edge of town at the new union station, might admit of debate. But that question is not before us. The plaintiff railroad company has its shifting yards further out, where its trains can be made up and where at least the chief part of the necessary shifting can be done. Certainly it is a reasonable exercise of the police power to forbid such “shifting” except at specified hours, on four blocks of the plaintiff’s track, in the heart of the town.
The plaintiff’s official returns show $223,000,000 of property owned by it. The defendant’s counsel having adverted to the very large proportion of this property held by the plaintiff in this State, the plaintiff’s counsel replied that Goldsboro had only 6,107 population, and contended that for “a little town like that to interfere with the operation of so vast an enterprise” was, to use his expression, “like the tail wagging the dog.” It is such a mistaken standpoint that doubtless induced the plaintiff on this occasion, and has so often induced such corporations, to assert what they deem their rights in defiance of the evident convenience and desires of the public by means of whose patronage such corporations thrive and make their profits. It is true, the city of Goldsboro is not large. But the powers it has exercised in making these ordinances, it exercises in the name of and by the right of the sovereignty of the people of this State. From that sovereignty the plaintiff derives its lights and its very existence. It was incorporated solely for the public *365convenience and subject to public regulation. Its stockholders were exempted from personal liability and it was granted the power of the State’s right of eminent domain to procure its right of way and to exercise its vocation. The right of the plaintiff to derive a profit from its business is an incident of a private nature and subject to the right of the sovereign to regulate its operations and to “alter or repeal its charter, at will.” Cons., Art. VII, sec. 1.
The requirement by the authorities of Goldsboro that the plaintiff railroad shall at its own expense ($3,400) change its grade where its road is crossed by other streets to conform to the grade adopted by the city, and its prohibition of “shifting” to make up trains on the main street of the town, within four blocks in the heart of the city, except in specified hours, are lawful exercise of the police powers conferred upon the city by the sovereign power in the State. Cooper v. R. R., 140 N. C., 229; Wilson v. R. R., 142 N. C., 348; Gerringer v. R. R., 146 N. C., 35. The only unreasonable aspect of the controversy is that the plaintiff should have resisted such requirements instead of yielding immediate assent or indeed preventing the necessity of the passage of such ordinance, by anticipating the wishes of the public in a matter so essential to the safety, comfort, and health of the town.
Affirmed.