We adopt the statement of the case made by the Court of Civil Appeals as follows: <
“Appellant sued the city of Taylor, its may- or, commissioners, manager, and secretary, and the International-Great Northern Railroad Company, seeking first an injunction to prevent the closing of that portion of one of the streets of said city upon and across the railroad company’s right of way, and in the alternative prayed for damages to appellant’s land by reason of such closing. The trial court sustained appellees’ general and special demurrers to appellant’s petition, and, upon his refusal to amend, dismissed the suit. Hence this appeal.
“The pleadings in the case are voluminous. Without following the order of plaintiff’s pleadings, the following substantial facts appear from his amended petition admitted as true, under said demurrers:
“The city of Taylor has a population of about 10,000, and operates under what is known as the home rule amendment to the Constitution. Main street is the principal business street of said city, and runs north *521and south. The railroad company’s tracks run east and west through the city. The business section lies north of said tracks. In the southwest part of said city, within the corporate limits, just south of the railroad and west from the business section, appellant owned about 77 acres of land, acreage property. This land was bounded on the north for its entire length of 1,952 feet by a public road, and the north line of said road formed the south line of the railroad right of way. It was bounded on the east for a distance of 1,830 feet by Doak street, which ran north and south through the city, intersecting the public road at the northeast corner of said 77-acre tract, and crossing the railroad right of way there. This street had been open and in use for a period of about 30 years, and was dedicated and in use when the appellant purchased this land. It was the only street which crossed the railroad tracks between Main street and the western limits of the city of Taylor, a distance of about a mile.
“In order to avoid congestion of traffic on Main street at the downtown section where it crossed the railroad tracks, the city proposed a contract with the railroad company that, if said railroad company would remove several of its side tracks across Main street, where it • had theretofore broken up its trains and done much switching, and decrease the switching there 90 per cent., and would open up another street across its right of way not more than three blocks west of Doak street, the city would close Doak street across its right of way for the exclusive use of the railroad company, for a period of 15 years from January 1, 1925. At an election held in the city of Taylor on September 29, 1924, in which was submitted the question of closing the Doak street crossing under these circumstances, such closing and contract were authorized by a vote of 204 to 28. An ordinance was then passed on October 2, 1924, closing the Doak street crossing for the use of the railroad company, and embodying the terms of the contract with the railroad company. The railroad company made another crossing over its tracks 1,100 feet west of the one closed, thus requiring those who crossed the right of way going north via Doak street to go 1,100 feet further west to do so. Appellant’s pleadings do not disclose whether the public road or any streets run east from his'property, so as to provide egress in that direction to Main street, where the railroad could then be crossed to the main business section of Taylor. Appellant’s chief complaint is that those residing upon his property are thus required to travel 1,100 feet further in order to reach the northern part of the city, and 2,200 feet further in order to reach the business section of the city, than was required before the Doak street crossing was closed.”
The Court-of Civil Appeals held that plaintiff m error’s petition stated no causé of action against the International-Great Northern Railroad Company for any character of relief, nor against the city of Taylor for in-junctive relief, but reversed and remanded the cause for another trial as against the city of Taylor, upon plaintiff in error’s alleged cause of action for damages against it.
Plaintiff in error asserts that the ordinance constitutes a contract between the city and International-Great Northern Railroad Company to close Doak street, and to grant to the latter an exclusive use of the portion of the street thus closed for a period of 15 years, and is void because it is an attempt to .contract away the rights, powers, and authority given to. said municipality under the Constitution and laws of this state.
The Court of Civil Appeals correctly held that the city of Taylor, under the home rule amendment, had express authority to “vacate, abandon, and close” its streets, alleys, avenues, and boulevards. Such "power is expressly delegated to municipal corpora- . tions by the home rule amendment, under article 1175, R. S. 1923. It must be borne in mind, however, that under the same statute (subdivision 17) such cities are given the power to “open, extend, straighten, widen any public street, alley, avenue, or boulevard.” Every city must keep itself in position to be able at any time to exercise either of the legislative powers thus granted. A city cannot use its delegated power to close any of its streets in such a way as to disable it from exercising the power to open extend, and widen any street when the public convenience requires it.
The principle is well settled that a city cannot by contract or otherwise surrender its governmental or legislative functions, nor can it legally enter into any contract which will embarrass or control its legislative powers and duties or which amount to an abdication of its governmental function or of its police power. 44 C. J. p. 75, § 2129, and authorities'there cited. That the power to lay out, open, grade, and improve streets, like other legislative powers, is a continuing one, has been often held in both federal and state courts. Dillon on Mun. Corp. (5th Ed.) § 1151; Goszler v. Georgetown, 6 Wheat. 593, 5 L. Ed. 339; Wabash Ry. Co. v. Defiance, 167 U. S. 88, 17 S. Ct. 748, 42 L. Ed. 87; Field v. Barbor Asphalt Co., 194 U. S. 618, 24 S. Ct. 784, 48 L. Ed. 1142; Marshall v. Allen (Tex. Civ. App.) 115 S. W. 849.
If the city of Taylor, acting in the public interest, had done no more by the ordi-. nance than to close Doak street, its validity would not be subject to serious question. The ordinance, however, goes considerably .further than merely closing the street. It is an' express contract upon the part of the city with the railroad company to close such street for the exclusive use of said company for a period of 15 years, upon the latter’s *522complying with certain terms of the ordinance. If this ordinance is valid, the city has clearly abridged its delegated legislative power to open such street during the period named in the ordinance. However much the convenience of the public might, require it, the city would be without power to open Doak street for 15 years.
In the case of City of Pontiac v. Carter, 32 Mich. 170, the Supreme Court of Michigan held that a city must remain in position to exercise its legislative power when required. In discussing this duestion Judge Cooley, speaking for the court, said: “A city cannot even by'contract deprive itself of any of its legislative powers; they are conferred upon it to be exercised again and again. as long and as often as occasion shall require.”
A similar principle was laid down by the Court of Civil Appeals for the Sixth District in City of Marshall v. Allen, 115 S. W. 849 (writ of error denied), wherein the contention was asserted that the city could not change the grade of a certain street because of a contract made by its engineer with a property holder. In denying the contention, the court said: “Assuming that Maxey had authority to act for the city in entering into such an agreement, and that' there was a consideration supporting it, it nevertheless should not be held to operate to deprive the city of the right conferred upon it by its charter.”
“The right of a city,” says Justice Brown, speaking for the Supreme Court of the United States in Wabash Ry. Co. v. Defiance, supra, “to improve its streets by regrading or otherwise, is something so essential to its growth and prosperity that [it] can no more denude itself of that right than it can of its power to legislate for the health, safety and morals of its inhabitants.”
In N. Y. & N. E. R. R. Co. v. Bristol, 151 U. S. 556, 14 S. Ct. 437, 38 L. Ed. 269, a similar rule was announced by the court in the use of this language: “The governmental power of self-protection cannot be contracted away, nor can the exercise of fights granted, nor the use of property, be withdrawn from the implied liability to governmental regulations in particulars essential to the preservation of the community from injury.”
In the Matter of Opening First Street, 66 Mich. 42, 33 N. W. 15, it was held that laying out and opening of streets by the common council of the city is an exercise of legislative functions, and that any contract made by the city with an individual or a corporation, by which it agrees that it will not in the future open or extend its streets in any particular place or part of the city, is an abnegation of its legislative power, unauthorized by its charter, and may be alike destructive of the convenience and prosperity of the municipality, hence is void.
The general rule deducible from the authorities is that the legislative power vested in municipal bodies, is something which cannot be bartered away in such manner as to disable them from the performance of their public functions. 2 Beach on Pub. Corp. §§ 1068 and 1208; Indianapolis v. Consumers’ Gas Co., 140 Ind. 107, 39 N. E. 433, 27 L. R. A. 514, 49 Am. St. Rep. 183; Davis v. Mayor, etc., of City of New York, 14 N. Y. 506, 67 Am. Dec. 186; Detroit v. Ft. Wayne & Elmwood Ry. Co., 90 Mich. 646, 51 N. W. 688; Chicago, Burlington & Quincy Ry. Co. v. Quincy, 139 Ill. 355, 28 N. E. 1069; Roanoke Gas Co. v. Roanoke, 88 Va. 810, 14 S. E. 665; Louisville City Ry. v. Louisville, 8 Bush (Ky.) 415; Hood v. Lynn, 1 Allen (Mass.) 103 ; Backus v. Lebanon, 11 N. H. 19, 35 Am. Dec. 466; Brimmer v. Boston, 102 Mass. 19; O’Connor v. Pittsburgh, 18 Pa. 187.
The ordinance in question, having the effect of abridging the legislative powers of the city of Taylor, is void; hence plaintiff in error’s petition, as against a general demurrer, stated a good cause of action for in-junctive relief. We recommend that the judgments of the trial court and the Court of Civil Appeals be reversed,, and the cause remanded for another trial.
CURETON, C. J.Judgments of the district court and Court of Civil Appeals reversed, and cause remanded to the district court.
We approve the holdings of the Commission of Appeals on the questions discussed in its opinion.