— Since 1900, appellant and its predecessors have paid to the city of Seattle two per cent of the gross receipts from operation of its street railway, as required by its franchises. In January, 1917, it refused to pay the sum of $64,387.78, the amount due for 1916, except upon conditions which were unacceptable to the city. Respondent brought action to recover the amount. A demurrer was sustained to appellant’s affirmative defenses, and also to each of the three alleged defenses in its amended answer. Refusing to plead further, judgment was entered against appellant as prayed in the complaint.
Appellant assigns as errors the action of the court: (1) In sustaining respondent’s demurrer to appellant’s *43first defense;- (2) in sustaining respondent’s demurrer to appellant’s second and affirmative defense; (3) in sustaining respondent’s demurrer to appellant’s third and affirmative defense, and in holding that the action of respondent set forth in such defense did not impair the obligation of the contract between respondent and appellant, in contravention of § 10, art. 1, of the constitution of the United States, and did not deprive appellant of its property without due process of law and deny it the equal protection of the law, in contravention of the fourteenth amendment to the constitution of the United States, and also in contravention of §§ 3 and 23, art. 1, of the constitution of the state of Washington; (4) in rendering judgment in favor of respondent against appellant for the sum sought to be recovered by respondent, and thereby upholding the action of respondent whereby the obligation of the contract between appellant and respondent was impaired, in contravention of § 10, art. 1, of the constitution of the United States, whereby appellant was deprived of its property without due process of law, in contravention of the fourteenth amendment to the constitution of the United States, and also of §§ 3 and 23, art. 1, of the constitution of the state of Washington; (5) in not holding that the third and affirmative defense constituted a complete estoppel against respondent, estopping it from recovering in this suit until it should refund to appellant the loss sustained by appellant by the enactment and enforcement of ordinance No. 28,253.
The main question for us to decide is whether the demurrer to appellant’s amended answer has been properly sustained. We will attempt to follow appellant’s assignments in order.
Appellant concedes that, until the enactment of the public service commission law in 1911 (Laws 1911, p. 538; Bern. Code, §8626-1 et seq.), the condition in the *44franchises requiring the payment of a percentage upon the gross earnings of the street railways was one with which it could legally comply. Appellant admitted the actual terms of the franchises, but denied the legal conclusions pleaded in the complaint. There is no dispute as to the amount involved, nor is there any question involved which makes it necessary to distinguish between the appellant and its predecessors in interest. Although the first defense, standing alone, raised an issue by denials, nevertheless appellant either conceded or admitted the facts triable under that issue, attempting to avoid the obligation pleaded in the complaint by its affirmative defenses.
In its second and affirmative defense, appellant pleads, in substance, the passage by the 1911 legislature of “an act relating to public service properties, providing for the regulation of the same, fixing penalties for the violation thereof, making an appropriation, and repealing certain acts,” which has ever since been, and is now, in force and effect; that defendant is a corporation authorized to construct, maintain and operate street railways in the cities of Seattle and Belling-ham, and that it has been for four years last past a common carrier of passengers upon the street railways authorized to be constructed and operated under the ordinances mentioned in the complaint; that the franchises of Seattle require that a percentage of the gross receipts of appellant be paid it, while the franchises granted to appellant by the city of Bellingham do not require such percentage; that the provision of the franchises mentioned in the complaint in this action, requiring the payment to Seattle of a percentage upon the gross receipts derived from the operation of the street railways under such franchises, is an undue and unjust discrimination against persons and localities in and outside of Seattle, and since the enactment of the *45public service commission law, approved March 18, 1911 (Laws 1911, p. 538; Rem. Code, §8626-1 et seq.), was, and now is, against the public policy of the state of Washington.
Appellant claims that the legislative authority of a city, acting as an agency of the state, has no power to prescribe for its own benefit terms and conditions not subject to future state control. In 1890, the legislature passed the enabling act relating to cities. Subdivision 9, § 5, of this act (Laws 1890, p. 218), Rem. Code, § 7507, contains the following grant of power:
“To authorize or prohibit the locating and constructing of any railroad or street railroad in any street, alley, or public place in such city, and to prescribe the terms and conditions upon which any such railroad or street railroad shall be located or constructed; ...”
This is a plain and specific grant by the state to the city of power to impose terms and conditions upon which any of its streets may be used by a street railroad. Specific and broader language could hardly be used.
In Tacoma R. & Power Co. v. Tacoma, 79 Wash. 508, 140 Pac. 565, it was held the legislature intended to, and did, vest the city with the whole of the state’s police power touching the subject-matter. State ex rel. Spokane & B. C. Tel. Co. v. Spokane, 24 Wash. 53, 63 Pac. 1116; Western Union Tel. Co. v. Richmond, 224 U. S. 160; Coverdale v. Edwards, 155 Ind. 374, 58 N. E. 495; State ex rel. Tacoma v. Sunset Telephone & Telegraph Co., 86 Wash. 309, 150 Pac. 427, L. R. A. 1917F 1178; State ex rel. Tacoma R. & Power Co. v. Public Service Commission, 101 Wash. 601, 172 Pac. 890.
The question here is whether the public service commission law, either by its terms or by necessary implication, attempted to confer power upon the public *46service commission to modify or abrogate franchise provisions which had theretofore been imposed by the city in granting the franchises under the specific grant of the legislature. Rem. Code, § 7507, subd. 7'. Appellant points us to § 21, p. 555, Laws 1911, Rem. Code, § 8626-21, which is as follows:
“Unreasonable Preference. — No common carrier shall make or give any undue or unreasonable preference or advantage to any person or corporation or to any locality or to any particular description of traffic in any respect whatsoever, or subject any particular person or corporation or locality or any particular description of traffic, to any undue or unreasonable prejudice or disadvantage in any respect whatsoever. ’ ’
Appellant claims that, if a. resident and taxpayer of Bellingham is transported upon the street railway lines in Seattle, he receives no benefit because a percentage upon his fare is paid into the city treasury of Seattle, while the resident taxpayers of Seattle who travel upon the lines in Seattle receive a benefit because a percentage upon the fares paid by them is paid into the treasury of Seattle; that to exact compensation for the use of public property of the state in one locality, while the use in another locality is free from such exaction, constitutes an undue discrimination in favor of one locality and against the other.
Can it be said that a municipality cannot exact a different rate of tax because some one city has failed to exact a tax upon the property within its boundary? Manifestly not. Furthermore, Laws 1911, p. 555, § 21, Rem. Code, § 8626-21, has no application to a franchise tax or the payment of a percentage of the gross earnings by a common carrier, and has no application to the case at bar. If the law confers power upon the public service commission to modify or abrogate franchise provisions, it must be found in Laws 1911, p. 571, *47§53 (Rem. Code, § 8626-53), which confers upon the commission the power to deal with the questions of safety, efficiency, rates and quality of service. There is nothing in this section which, either expressly or by necessary implication, confers power upon the public service commission to deal with* the question of franchises or to modify or abrogate any of the terms or conditions that may have previously been imposed therein. The law will be searched in vain for any provision which confers such power upon the public service commission with reference to such a public utility as that before us.
“The right to deal with the question of rates and service is an entirely different matter from the right to grant franchises or abrogate the provisions thereof. The franchises in question having been granted under the clear and express authority of the statute enacted long prior to the public service commission law, it seems plain that it was not the intent of the latter law to grant power to the commission to abrogate franchise provisions. Had the legislature desired to confer this power upon the commission it would have been easy to have said so in such language as would have made the intent plain.” State ex rel. Tacoma R. & Power Co. v. Public Service Commission, 101 Wash. 601, 172 Pac. 890.
The substance of appellant’s third and affirmative defense is as follows: That the franchises enumerated in the complaint, before being granted, were offered to the highest bidder; that they contained a provision that there should be kept on sale at the main office and power stations of the grantee twenty-five commutation tickets for one dollar; that the franchises also provided that the grantee might establish and take a passenger fare not to exceed five cents for a single continuous ride within the city; that, in October, 1911, council bill No. 16,096 was passed, requiring all street. *48car companies to sell on its cars twenty-five car tickets for one dollar, or six for twenty-five cents, and providing that any person or corporation failing to comply with this requirement should he deemed guilty of a misdemeanor and fined not to exceed one hundred dollars, or imprisoned in the city jail not to exceed thirty days; that, while this bill was pending, appellant appeared before the city council and protested against the passage of such bill, on the ground that it would violate the terms of its franchise and would be a law impairing the obligation of the contract with respondent ; that, although protested against, the bill was passed, vetoed by the mayor, and was passed over the mayor’s veto and became ordinance No. 28,253; that such ordinance took effect on November 19, 1911; that, before it took effect, appellant instituted suit in the circuit court of the United States for the western district of Washington against the respondent herein to •enjoin the enforcement of such ordinance, alleging that its enforcement would damage the holder of the franchises in a sum in excess of $5,000, and that the ordinance was null and void for the reason that it impaired the obligation of appellant’s contract and was forbidden by § 10, art. 1, of the constitution of the United States; that the city successfully resisted the issuance of a temporary injunction, “and during the pendency of such suit the Seattle Electric Company was compelled to comply with the provisions of the ordinance,” and the appellant, as its successor, was likewise compelled by the respondent herein to comply with the ordinance until August 15, 1913, at which time a decision was rendered, holding the ordinance invalid upon the ground that it was beyond the power of the city to enact such ordinance; that, by reason of the enforcement of the ordinance, appellant was caused a loss, during the pendency of such suit, of upwards of *49$70,000; that the respondent has refused to refund any portion of the compensation so lost hy it and them, and that such refusal and the enforcement by respondent of its claim for two per cent of the gross receipts derived from operating the street railway impairs the obligation of the contract of the appellant with the city of Seattle, created by the franchises mentioned in the complaint, in contravention of § 10, art. 1, of the constitution of the United States, and deprives the appellant of its property without due process of law; and denies it the equal protection of the law, in contravention of the fourteenth amendment to the constitution of the United States, and also of §§ 3 and 23, art. 1, of the constitution of the state of Washington.
The main questions involved in this defense have been tried in Seattle Electric Co. v. Seattle, 206 Fed. 955. It was there held that ordinance No. 28,253 was null and void. It is also said:
“The plaintiff further contends that it has been damaged in the sum of $5,000 per month since the commencement of this suit by reason of the fact that it has been compelled to sell commutation tickets at reduced rates fixed by the ordinance, and it claims damages on that basis. Waiving the question whether these damages have been proved by competent evidence, I am clearly of opinion that they are not recoverable, either at law or in equity. Municipal corporations are created by the state for political objects, and are invested with certain governmental powers, to be exercised for local purposes and for the public good. . . . The distinction between governmental powers and mere private franchises has often been recognized by the courts of this state, and the nonliability of municipalities for acts committed in the exercise of the former had been asserted in the most positive terms. Lawson v. Seattle, 6 Wash. 184, 33 Pac. 347; Simpson v. Whatcom, 33 Wash. 392, 74 Pac. 577, 63 L. R. A. 815, 99 Am. St. 951; Lynch v. North Yakima, 37 Wash. 657, 80 Pac. 79, 12 L. R. A. (N. S.) 261; *50Cunningham v. Seattle, 40 Wash. 59, 82 Pac. 143, 4 L. R. A. (N. S.) 629; s. c., 42 Wash. 134, 84 Pac. 641, 4 L. R. A. (N. S.) 629, 7 Ann. Cas. 805. If a municipality ever acts in a purely governmental capacity, it would seem to so act in the passage of an ordinance of this kind in relation to a subject in which the general public is alone concerned, and in which it has no private or proprietary interest.”
The case of Simpson v. Whatcom, supra, cited therein, is especially apt. See, also, Cooley, Torts (2d ed.), p. 739; Dillon, Municipal Corporations, §976; 5 Thompson, Negligence, § 5789.
If, in attempting to carry out one of its authorized functions, a municipality exceeds its statutory authority, the corporation is not liable for injuries that result. 19 E. C. L. § 414, and cases cited. These authorities amply support the decision in 206 Fed. 955.
Another question is: Even should we hold that appellant has a cause of action if brought independently, could it be properly set off as a counterclaim in this action under Eem. Code, §265; does it relate to ■ the same matter embraced in the complaint or arise out of contract? Appellant’s damage, is claimed on account of the passage of a void ordinance in 1911 and appellant’s obedience'thereto until August 15, 1913. This is not a proper counterclaim to the complaint demanding two per cent of its gross receipts for 1916 as provided in the franchises. In Veysey v. Thompson, 49 Wash. 571, 95 Pac. 1096, it was held that a counterclaim for damages arising out of the wrongful issuance of an attachment cannot be pleaded in answer to the complaint in the original action. See, also, Hyde v. Clausin, 82 Wash. 218, 144 Pac. 50.
We do not think that appellant’s third and affirmative defense would have the effect of barring respondent’s recovery as set forth in the complaint, nor will it support an affirmative judgment as pleladed.
*51Appellant relies on Crawford v. Seattle, Renton & S. R. Co., 97 Wash. 70, 165 Pac. 1070, for its nonliability to pay the two per cent of its gross receipts, but that case is readily distinguishable from the case at bar. In that case the city was attempting to collect the two per cent of the gross receipts during the period that the railway company was denied the right to operate under its franchise, which the city council had attempted theretofore to revoke. In the present case, by a void ordinance, until August 15, 1913, the city attempted to require the company to sell car tickets at the same rate but at places other than those specified in the franchise. There is no claim by appellant that it was deprived of the right to operate fully and unmolested under its franchise during 1916, for which year the city claims the two per cent of the gross receipts. There is no allegation in appellant’s defenses that it filed a claim with the city as required by Seattle charter, art. 4, § 29, and Rem. Code, % 7995.
Appellant contends that, by virtue of the passage of the void ordinance No. 28,253 and the alleged damage subsequently sustained by it, the city is now estopped from recovering in this suit until the original status existing between the parties has been restored. There is no such allegation in the amended answer, and we cannot now consider it. All allegations in the original answer are waived by filing and serving the amended answer. The last amended answer must be considered complete for purposes therein alleged. In Sengfelder v. Hill, 16 Wash. 355, 47 Pac. 757, 58 Am. St. 36, it is said: “When he elects to amend and does amend, he must stand upon the case as stated in his amendment.” The statute is clear on this matter. Rem. Code, § 304, reads:
“When any pleading or proceeding is amended before trial, mere clerical errors excepted, it shall be done *52by filing a new pleading, to be called tbe amended complaint, or otherwise, as the case may be. Snch amended pleading shall be complete in itself, without reference to the original, or any preceding amended one.”
There being no error in the trial court’s ruling, the judgment is affirmed.
Main, O. J., Mitchell, Fullerton, Parker, and Tolman, JJ., concur.