
568 P.2d 541 (1977)
LOCAL # 8 INTERNATIONAL ASSOCIATION OF FIRE FIGHTERS, Plaintiff and Appellant,
v.
CITY OF GREAT FALLS, Defendant and Respondent.
No. 13616.
Supreme Court of Montana.
Submitted June 2, 1977.
Decided August 30, 1977.
*542 McKittrick & Duffy, Great Falls, Joseph W. Duffy (argued), Great Falls, for plaintiff and appellant.
Howard C. Burton and Leslie S. Waite (argued), Great Falls, for defendant and respondent.
HASWELL, Justice.
This is an appeal from an order entered by the district court, Cascade County, dismissing two counts of a complaint filed by Local # 8, International Association of Firefighters against the City of Great Falls. Local # 8 brought the action for declaratory judgment to determine the rights of the parties with respect to longevity pay of firemen employed by the City. Counts I and II of Local # 8's complaint were dismissed by the district court for failure to state a cause of action under which relief could be granted. Count III, concerning an unrelated matter, is still pending for trial.
Local # 8 is a labor organization and the certified collective bargaining agent for firemen employed by the City. The City is a municipal corporation and is the employer bargaining agent for collective bargaining purposes. The City and Local # 8 entered into numerous collective bargaining agreements which cover all years material to this case. These agreements cover all matters of wages, hours and working conditions affecting the firemen.
*543 Since 1937, section 11-1932, R.C.M. 1947 (and its predecessors) has established minimum wages to be paid to firemen employed by first class cities such as Great Falls. In 1957, section 11-1932 was amended to provide for a higher minimum wage and also longevity pay. A fireman thereafter was entitled to a minimum salary equal to the statutory base wage plus 1% of the base wage for each year he served up to 20 years. Thus, in 1957, when the statutory base wage was $350, a fireman who had served for one year was entitled to a minimum salary of $353.50 ($350.00 + 1% of $350.00 = $353.50). It is important to note the 1% longevity pay was a percentage of the statutory minimum base wage rather than of the actual wage being received by the employee. Thus, if the employee's actual wage was higher than the statutory minimum wage, section 11-1932 had no effect upon his actual salary. Subsequent amendments to section 11-1932 in succeeding years increased the statutory base wage.
A 1975 amendment of section 11-1932 allowed accumulation of longevity beyond 20 years and increased the minimum salary to $700. Likewise, the collective bargaining agreement executed by the firemen and the City provided for an increase in salary for the firemen. At all times relevant herein the salary paid by the City to each fireman exceeded the statutory base salary plus longevity pay.
In 1956, the Council of the City of Great Falls passed Resolution No. 4973 dealing with longevity pay for firemen. The Resolution granted longevity pay of 1% per year of service (up to a maximum of 5%) to those firemen who served more than 20 years. This longevity pay is calculated by computing a percentage of the actual wage received by the fireman rather than the statutory minimum wage. The purpose and intent of the Resolution is clearly stated in its opening paragraph, which reads:
"THAT WHEREAS it is deemed wise by the Council to reward faithful Firemen and Policemen who have served said City a full period of at least 20 years by an increase of pay so as to induce a longer tenure of service by the same * * *."
This Resolution continued in full force and effect for some twenty years and was incorporated in the collective bargaining agreements executed by the parties during this period. Several firemen have served the full period and have become entitled to the additional longevity pay. These longtenured firemen have been paid longevity pay by the City in accordance with the Resolution.
In May 1975 the City Commission passed Resolution No. 6759 which repealed Resolution No. 4973 effective July 1, 1975. The stated reason for the repeal of the longevity pay resolution was to eliminate "double compensation for firemen and policemen" in light of the 1975 legislative action removing the 20 year limitation on longevity pay for firemen and policemen.
At the time the City repealed Resolution No. 4973, there was an existing collective bargaining agreement in effect. There were no negotiations with the firemen or Local # 8 to delete the 20 year longevity provision from the contract.
On August 7, 1975, Local # 8 made formal protest to the City of the repeal of the longevity pay provision. On August 21, the City denied and rejected the protest. On or about September 8 the parties agreed the issues relative to this case should be pursued through the courts to determine the rights of the parties. It was agreed the signing of a new collective bargaining agreement in September 1976 would not constitute a waiver of protests and disputes relative to the repeal of the longevity pay provision.
Four issues are before this Court upon appeal:
1. Whether the City, by virtue of Resolution No. 4973 created contractual rights enuring to the benefit of its firemen.
2. Whether the repeal of Resolution No. 4973 was an unconstitutional breach of the collective bargaining agreement then in effect.
3. Whether the repeal of Resolution No. 4973 was necessary to eliminate double compensation to the firemen.
*544 4. Whether the dismissal by the district court of Counts I and II of plaintiff's complaint was error.
The first issue concerns the question of whether a contract was created for the benefit of the firemen by the City's adoption of Resolution No. 4973 concerning longevity pay. A companion question to be answered in resolving this issue is  whether the City had the authority to repeal the ordinance in light of the possible contract created?
This precise issue is a matter of first impression in this jurisdiction. The parties cite Bartels v. Miles City, 145 Mont. 116, 399 P.2d 768 (1965); State ex rel. Evans v. Fire Dept. Relief Assn., 138 Mont. 172, 355 P.2d 670 (1960), and Clarke v. Ireland, 122 Mont. 191, 199 P.2d 965 (1948), as controlling precedent in regard to this issue. This line of authority is clearly distinguishable from the instant case. In all these cases, the employees had contributed moneys into a fund of a certain nature with the expectation of receiving a benefit therefrom. Such is not the case here and therefore, we do not rely on these cases.
We further hold that Stephens v. City of Billings, 148 Mont. 372, 422 P.2d 342 (1967) is not controlling. In Stephens we held that a seniority rule enacted by a city ordinance could be repealed and no vested contract right was created for the benefit of certain city employees. The fact situations in Stephens and the instant case are admittedly similar; however, the seniority rule, as adopted by the ordinance, expressly provided for alteration by appropriate action of the city council. For this reason, Stephens is distinguishable.
The long standing general rule is that the body which enacted an ordinance has the power to repeal such ordinance. Wright v. City of Florence, 229 S.C. 419, 93 S.E.2d 215 (1956); City Council of Charleston v. Wentworth Street Baptist Church, 4 Strob. 306 (S.C. 1850). A specific grant of authority is not necessary to repeal ordinances as the general rule implies that power unless otherwise provided. Wright v. City of Florence, supra; 6 McQuillin, Mun. Corp. (3rd Ed.), § 21.10.
This area of law is summarized in 6 McQuillin, Mun.Corp. (3rd Ed.), § 21.10, p. 208:
"The power of repeal extends, generally speaking, to all ordinances. Indeed, a municipal corporation cannot abridge its own legislative powers by the passage of irrevocable ordinances. The members of its legislative body are trustees for the public, and the nature and limited tenure of their office impress the ordinances enacted by them with liability to change. One council may not by an ordinance bind itself or its successors so as to prevent free legislation in matters of municipal government. Accordingly, in the absence of a valid provision to the contrary, a municipal council or assembly having the power to legislate on, or exercise discretionary or regulatory authority over, any given subject may exercise that power at will by enacting or repealing an ordinance in relation to the subject. Thus, the power of repeal extends to legislative enactments and, a fortiori to ordinances of an administrative character, as, for example, an ordinance fixing the fiscal year of a municipal corporation. The power does not extend, however, to authorize impairment of a contract or deprivation of property without due process of law."
In addition to the limitation upon the right of repeal which impairs a contract or deprives one of property without due process of law, a third exception is generally recognized. This exception exists where an ordinance has been enacted under a narrow limited grant of authority to do a single designated thing in the manner and at the time prescribed by the legislature. In effect, no right of repeal exists as to an ordinance that constitutes the exercise of municipal power which is exhausted by its single exercise.
Clearly an implied contract between the City and Local # 8 was created by Resolution No. 4973. An offer to pay longevity was made by the resolution. This *545 offer was accepted by the firemen as evidenced by both the many years of diligent service provided and the incorporation of this provision into subsequent collective bargaining agreements. The stated purpose of the resolution was "to induce a longer tenure of service" by the firemen. That purpose was accomplished. During the 20 year period that followed passage of the resolution, numerous firemen attained the required 20 years of service and became entitled to the increased pay. Any contention that firemen were not induced to serve longer terms by the longevity provision is simply not correct.
Once the determination is made that a contract was created by Resolution No. 4973, the next question that must be answered is the effect of the repeal of the resolution. A virtually identical issue was discussed in City of Owensboro v. Board of Trustees, 301 Ky. 113, 190 S.W.2d 1005 (1945). In that case an ordinance was passed creating a civil service system for city employees. Several years later the civil service ordinance was repealed by a second ordinance. Thereafter, the ordinance repealing the civil service ordinance was repealed. The city filed a declaratory judgment action to determine the status of city employees who were hired or employed by the city during this period.
The Kentucky Court of Appeals found that a contract was created by the original civil service ordinance. The rights acquired by city employees who were employed during the operative life of the civil service ordinance could not be affected by the subsequent lawful repeal of the ordinance. In City of Owensboro the court stated:
"* * * Consequently, the repealing ordinance annulled, abrogated, and put an end to the Civil Service Ordinance. It must be admitted, however, that the repeal of it * * * did not and could not affect the vested rights and the inviolable contract of the employees who became such, and qualified under the Civil Service Ordinance within its operative life." 190 S.W.2d 1008.
Similar results were reached by the Kentucky courts in Hopwood v. City of Paducah, (Ky. 1968), 424 S.W.2d 134; Ritte v. City of Covington, 308 Ky. 792, 215 S.W.2d 980 (1948).
We find this authority persuasive in the instant case and therefore hold the repeal of Resolution No. 4973 by the City was effective. However, this repeal has absolutely no effect on the vested contract rights to longevity acquired by Great Falls firemen during the operative life of the ordinance. All firemen who commenced employment as Great Falls firemen or served in such a capacity during the effective period of the ordinance have a vested contractual right.
In its second issue Local # 8 complains the City's repeal of Resolution No. 4973 is an unconstitutional enactment which has the effect of impairing the obligations of the contract between the City and Local # 8. Resolution No. 4973 has been incorporated by reference into all collective bargaining agreements between the parties including the one in effect at the time the resolution was repealed.
Art. II, Section 31, 1972 Montana Constitution states that no "law impairing the obligation of contracts * * * shall be passed by the legislature." Constitutional provisions prohibiting the impairment of contractual obligations apply to municipal ordinances and resolutions. 16 C.J.S. Constitutional Law, § 278, p. 1280, states:
"Ordinances and resolutions passed by the municipal subdivisions of a state in pursuance of delegated legislative authority of the state are laws within the meaning of constitutional provisions and void if they impair the obligations of contracts. * * *"
By repealing Resolution No. 4973, incorporated into the contract between the City and Local # 8, the City has attempted to change the terms of this contract. Such a change violates the foregoing constitutional provision as well as the Constitution of the United States. This contract between a union and a governmental entity is entitled to the same protection of the federal *546 and Montana Constitutions that is afforded a contract between individuals. State ex rel. Evans v. Fire Dept. Relief Assn., supra; Clarke v. Ireland, supra; State ex rel. State Savings Bank v. Barret, 25 Mont. 112, 63 P. 1030 (1901).
We therefore hold the resolution repealing Resolution No. 4973 is unconstitutional as applied to firemen covered by the contract in effect at the time of the repeal.
Appellant's third issue deals with the City's contention the repeal of Resolution No. 4973 was necessary to eliminate double compensation for firemen in light of the 1973 legislative action removing the 20 year limitation on longevity pay for firemen. This is a false issue in this case. The facts clearly show firemen employed by the City of Great Falls have at all times been paid in excess of the statutory minimum plus longevity. Therefore, a change in the length of the longevity allowed by statute has no effect on firemen involved herein.
Appellant's final issue deals with the propriety of the dismissal of Counts I and II of appellant's complaint. The standard for reviewing rulings on motions to dismiss was recently discussed in Hasbrouck v. Krsul, 168 Mont. 270, 272, 541 P.2d 1197, 1198 (1975), where this Court stated:
"In judging the correctness of that order, we apply the strict standard for Federal Rule 12, after which Montana's Rule 12, M.R.Civ.P. was patterned. In Conley v. Gibson, 355 U.S. 41, 45, 46, 78 S.Ct. 99, 102, 2 L.Ed.2d 80, 84, it is said:
"`* * * a complaint should not be dismissed for failure to state a claim unless it appears beyond doubt that the plaintiff can prove no set of facts in support of his claim which would entitle him to relief.'"
Further discussion is found in Duffy v. Butte Teachers Union, 168 Mont. 246, 252, 541 P.2d 1199 (1975), where the Court said:
"A motion to dismiss for failure to state a claim upon which relief can be granted, Rule 12(b)(6), M.R.Civ.P., is equivalent to a demurrer under former civil procedure. Payne v. Mountain States Tel. and Tel. Co., 142 Mont. 406, 409, 385 P.2d 100. A motion to dismiss admits to all facts well pleaded and in considering the motion the material allegations of the pleading attacked are taken as true. Deich v. Deich, 136 Mont. 566, 585, 323 P.2d 35. Where a complaint states facts sufficient to constitute a cause of action upon any theory, then the motion to dismiss must be overruled. Magelo v. Roundup Coal Mining Co., 109 Mont. 293, 300, 96 P.2d 932. However, when a complaint alleges facts and, assuming the facts are true, there still is no claim for relief stated under any theory, a motion to dismiss must be granted." 168 Mont. 252, 541 P.2d 1203.
We expressly refuse to rule upon the merits of this case. However with the foregoing standard for review in mind, we hold the district court erred when it dismissed Counts I and II of appellant's complaint. Counts I and II are simply claims for relief on the basis of a contract between the City and the firemen. Resolution of appellant's previous issues makes it abundantly clear appellant's complaint is not so defective as to appear beyond a doubt that appellant can prove no set of facts in support of its claim which would entitle it to relief.
We reverse the ruling of the district court dismissing Counts I and II of the complaint and remand this matter for trial on the merits.
DALY and SHEA, JJ., concur.
HATFIELD, C.J., did not participate in this case.
