
29 Cal.2d 848 (1947)
HENRY A. KERN, Petitioner,
v.
CITY OF LONG BEACH et al., Respondents.
L. A. No. 19553. 
Supreme Court of California. In Bank.  
Apr. 1, 1947.
 Joseph A. Ball and Kenneth Sperry for Petitioner.
 Irving M. Smith, City Attorney, and Clifford E. Hayes, Deputy City Attorney, for Respondents. *850
 GIBSON, C.J.
 In this proceeding petitioner seeks a writ of mandate compelling respondent city to pay him a pension under a provision of the city charter which was repealed shortly before he would have been entitled to retire.
 Petitioner entered upon his duties as a member of the city fire department on May 1, 1925, at which time subdivision 2 of section 187 of the charter provided that after twenty years' aggregate service a member on application "shall be retired and paid in equal monthly installments" a limited pension equal to fifty per cent of his annual salary. Beginning in March, 1931, pursuant to an amendment to the charter, two per cent of the employee's salary was deducted and paid into a pension fund. Effective as of March 29, 1945, approximately thirty-two days before petitioner completed the required twenty years' service, a new section was added to the charter purporting to repeal the pension provisions and to eliminate pensions as to all persons not then eligible for retirement. Upon completion of his twenty years' service, petitioner requested that he be retired and paid a pension. The city rejected his application and petitioner instituted this proceeding to compel payment of installments as provided by the charter before the purported repeal. [1] The issue presented here may properly be raised by a proceeding in mandamus. (McKeag v. Board of Pension Commrs., 21 Cal.2d 386, 392 [132 P.2d 198]; see, also, England v. City of Long Beach, 27 Cal.2d 343 [163 P.2d 865]; Sweesy v. Los Angeles etc. Retirement Bd., 17 Cal.2d 356 [110 P.2d 37]; Dillard v. City of Los Angeles, 20 Cal.2d 599 [127 P.2d 917]; Dillon v. Board of Pension Commrs., 18 Cal.2d 427 [116 P.2d 37, 136 A.L.R. 800]; Sheehan v. Board of Police Commrs., 197 Cal. 70 [239 P. 844]; French v. Cook, 173 Cal. 126 [160 P. 411].)
 The question to be determined is whether petitioner acquired a vested right to a pension which the city could not abrogate by repealing the charter provisions without impairing its obligation of contract.
 The nature and extent of the city's obligation must be ascertained not only from the language of the pension provisions but also from the judicial construction of this or similar legislation at the time the contractual relationship was established. (See Warburton v. White, 176 U.S. 484, 495 [20 S.Ct. 404, 44 L.Ed. 555]; Ennis Water Works v. City of Ennis, 233 U.S. 652, 657-658 [34 S.Ct. 767, 58 L.Ed. 1139]; cf. Great Northern Ry. Co. v. Sunburst Co., 287 U.S. 358, 361-362 [53 *851 S.Ct. 145, 77 L.Ed. 360, 85 A.L.R. 254]; Coombes v. Getz, 285 U.S. 434, 445, 451 [52 S.Ct. 435, 76 L.Ed. 866]; Wood v. Lovett, 313 U.S. 362, 370 [61 S.Ct. 983, 85 L.Ed. 1404]; Rottschaeffer, Constitutional Law (1939) 560.) Moreover, decisions rendered after the time of the making of the contract, although not conclusive, will be given great weight. (Dodge v. Board of Education, 302 U.S. 74, 79 [58 S.Ct. 98, 82 L.Ed. 57]; Warburton v. White, supra, 176 U.S. at pages 495-496.)
 In some states pensions for government employees are treated as gratuities or bounties which can be withdrawn at any time. (See 54 A.L.R. 943; 98 A.L.R. 505; 112 A.L.R. 1009; 137 A.L.R. 249.) In California, however, section 31 of artivle IV of the Constitution forbids gifts of public money to an individual, and this prohibition may have influenced our courts to hold that a pension right constitutes something more than a mere gratuity.
 [2] It is settled in this state that pension rights acquired by public employees under statutes similar to the Long Beach Charter become vested as to each employee at least on the happening of the contingency upon which the pension becomes payable. (Kavanagh v. Board of Police P. F. Commrs., 134 Cal. 50 [66 P. 36]; McCarthy v. City of Oakland, 60 Cal.App.2d 546, 550 [141 P.2d 4]; see Gibson v. City of San Diego, 25 Cal.2d 930, 936-937 [156 P.2d 737]; Sweesy v. Los Angeles etc. Retirement Bd., 17 Cal.2d 356, 361 [110 P.2d 37]; Klench v. Board of Pension Fd. Commrs., 79 Cal.App. 171, 182 [249 P. 46]; see, also, England v. City of Long Beach, 27 Cal.2d 343 [163 P.2d 865]; City of Long Beach v. Lentz, 27 Cal.2d 890 [165 P.2d 677].)
 In the Kavanagh case, the court, following a suggestion in Pennie v. Reis, 80 Cal. 266 [22 P. 176]; 132 U.S. 464 [10 S.Ct. 149, 33 L.Ed. 426], held that the right of the widow of a public employee to a pension benefit "became vested while the statute under which she claims was in full force, and it was not competent for the legislature, or any other authority, to deprive her of that vested right." (134 Cal. at p. 52.) The Pennie and Kavanagh cases did not analyze the problem, but the nature of the right was subsequently stated in O'Dea v. Cook (1917), 176 Cal. 659, 661-662 [169 P. 366], as follows: "A pension is a gratuity only where it is granted for services previously rendered which at the time they were rendered gave rise to no legal obligation. ... But where, as here, *852 services are rendered under such a pension statute, the pension provisions become a part of the contemplated compensation for those services and so in a sense a part of the contract of employment itself." This language has been quoted with approval in Gibson v. City of San Diego, 25 Cal.2d 930, 937 [156 P.2d 737], and Riggs v. District Retirement Board, 21 Cal.2d 382, 385 [132 P.2d 1]. The New York Court of Appeals has recently declared: "Pension annuities ... are in the nature of compensation for the services previously rendered for which full and adequate compensation was not received at the time of the rendition of such services. They are in effect pay withheld to induce long-continued and faithful services." (Giannettino v. McGoldrick (1946), 295 N.Y. 208 [66 N.E.2d 57, 59].)
 It is contended by the city, however, that petitioner did not acquire any vested right to a pension because he did not complete the prescribed period of service prior to the time the pension provisions were repealed. It is therefore necessary to ascertain whether any rights vested prior to the repeal and, if so, the nature and extent of those vested rights.
 This court has stated in two recent decisions that the right to a pension vests upon acceptance of employment. In Dryden v. Board of Pension Commrs., 6 Cal.2d 575, 579 [59 P.2d 104], the court said: "It has been clearly held that the pension provisions of the city charter are an integral portion of the contemplated compensation set forth in the contract of employment between the city and a member of the police department, and are an indispensable part of that contract, and that the right to a pension becomes a vested one upon acceptance of employment by an applicant." In French v. French, 17 Cal.2d 775, 777 [112 P.2d 235], we said: "The Dryden case concerned the rights of a policeman in a pension fund to which he had made contributions while he was on active duty. It was held that by the provisions of the city charter, under which that fund was created and maintained, the right to a pension was an integral part of the contract of employment and became a vested right at the time the employment began." (See, also, Aitken v. Roche, 48 Cal.App. 753, 755 [192 P. 464].)
 The quoted statements are not in conflict with language appearing in some cases to the general effect that public employment is not held by contract. (See Miller v. Kister, 68 Cal. 142, 144 [8 P. 813]; Risley v. Board of Civil Service *853 Commrs., 60 Cal.App.2d 32, 36 [140 P.2d 167]; Nider v. City Commission, 36 Cal.App.2d 14, 30 [97 P.2d 293]; Mansfield v. Chambers, 26 Cal.App. 499, 504 [147 P. 595].) These cases involve the right to remain in an office or employment, or to the continuation of civil service status. [3] Although there may be no right to tenure, public employment gives rise to certain obligations which are protected by the contract clause of the Constitution, including the right to the payment of salary which has been earned. [4] Since a pension right is "an integral portion of contemplated compensation" (Dryden v. Board of Pension Commrs., 6 Cal.2d at p. 579 [59 P.2d 104]), it cannot be destroyed, once it has vested, without impairing a contractual obligation. Thus the courts of this state have refused to hold, in the absence of special provision, that public employment establishes tenure rights, but have uniformly held that pension laws such as the Long Beach Charter provision establish contractual rights. It was the failure to recognize this distinction that led to an erroneous criticism of the Dryden case in Risley v. Board of Civil Service Commrs., 60 Cal.App.2d 32, 39-40 [140 P.2d 167]. [5] The fact that a pension right is vested will not, of course, prevent its loss upon the occurrence of a condition subsequent such as lawful termination of employment before completion of the period of service designated in the pension plan.
 The city relies upon cases holding that the governing body may make modifications in a pension system prior to the time for commencement of payments. It is true that there are many decisions in this state which permit modifications, but it does not follow that an employee may be deprived of all pension benefits by a repeal of the statute without the enactment of a substitute, and no decision has been found holding that an employee's pension rights may be entirely destroyed in that manner. Although there is language in some of our cases to the general effect that a repeal operates to take away pension rights, the statements must be considered in relation to the facts in issue, and an examination of these decisions reveals that they relate either to modifications of a pension system or to the construction of legislation, and none of them involves the outright repeal of a pension statute. (See Sweesy v. Los Angeles etc. Retirement Bd., 17 Cal.2d 356, 361-362 [110 P.2d 37]; O'Dea v. Cook, 176 Cal. 659, 662 [169 P. 366]; Brophy v. Employees Retirement System, 71 Cal.App.2d 455, 459 [162 P.2d 939]; Risley v. Board of Civil Service Commrs., *854 60 Cal.App.2d 32, 39-41 [140 P.2d 167]; McCarthy v. City of Oakland, 60 Cal.App.2d 546, 550 [141 P.2d 4]; Jordan v. Retirement Board, 35 Cal.App.2d 653, 657 [96 P.2d 973]; Brooks v. Pension Board, 30 Cal.App.2d 118, 120-121, cf. 123 [85 P.2d 956]; Klench v. Board of Pension Fd. Commrs., 79 Cal.App. 171, 183 [249 P. 46]; Richards v. Wheeler, 10 Cal.App.2d 108, 115 [51 P.2d 436].)
 In the leading case of Pennie v. Reis (1889), 80 Cal. 266 [22 P. 176] (affirmed in 132 U.S. 464 [10 S.Ct. 149, 33 L.Ed. 426]), a death benefit payable to legal representatives was eliminated by the implied repeal of a pension statute, but the repealing statute substituted a more comprehensive pension system which included a death benefit payable to certain dependents. The practical result was a modification which gave the employees more pension benefits than they had before. This case therefore does not stand for the proposition that an employee may be deprived of all pension rights. Clarke v. Reis, 87 Cal. 543 [25 P. 759], and Clarke v. Police etc. Ins. Board, 123 Cal. 24 [55 P. 576], were based on the same statute and are distinguishable on the same grounds. (Cf. Cohrn v. Henderson (1912), 19 Cal.App. 89 [124 P. 1037]; Burke v. Board of Trustees (1906), 4 Cal.App. 235 [87 P. 421].)
 The kind of modification that has been upheld is illustrated by Brophy v. Employees Retirement System, 71 Cal.App.2d 455 [162 P.2d 939], where the court sustained an amendment, made before the time for retirement, reducing the monthly amount to be paid to retired employees engaged in gainful occupations. It has also been held that a pension could be reduced prior to retirement from two-thirds to one-half of the employee's salary, and modifications have been approved in some cases when made after the happening of the contingencies upon which the payments were to commence. (Brooks v. Pension Board, 30 Cal.App.2d 118 [85 P.2d 956]; Sweesy v. Los Angeles etc. Retirement Bd., 17 Cal.2d 356 [110 P.2d 37]; Home v. Souden, 199 Cal. 508 [250 P. 162]; Casserly v. City of Oakland, 6 Cal.2d 64 [56 P.2d 237]; Brophy v. Employees Retirement System, 71 Cal.App.2d 455 [162 P.2d 939]; McCarthy v. City of Oakland, 60 Cal.App.2d 546, 550 [141 P.2d 4]; Vero v. Sacramento City E. R. System, 41 Cal.App.2d 482, 486 [107 P.2d 82].)
 The rule permitting modification of pensions is a necessary one since pension systems must be kept flexible to permit adjustments in accord with changing conditions and at the same *855 time maintain the integrity of the system and carry out its beneficent policy. The permissible scope of changes in the provisions need not be considered here, because the respondent city, with a minor exception, has repealed all pension provisions.
 [6] Thus it appears, when the cases are considered together, that an employee may acquire a vested contractual right to a pension but that this right is not rigidly fixed by the specific terms of the legislation in effect during any particular period in which he serves. The statutory language is subject to the implied qualification that the governing body may make modifications and changes in the system. The employee does not have a right to any fixed or definite benefits, but only to a substantial or reasonable pension. There is no inconsistency therefore in holding that he has a vested right to a pension but that the amount, terms and conditions of the benefits may be altered.
 [7] In so far as the time of vesting is concerned, there is little reason to make a distinction between the periods before and after the pension payments are due. It is true that an employee does not earn the right to a full pension until he has completed the prescribed period of service, but he has actually earned some pension rights as soon as he has performed substantial services for his employer. (See Dryden v. Board of Pension Commrs., 6 Cal.2d 575, 579 [59 P.2d 104]; French v. French, 17 Cal.2d 775, 777 [112 P.2d 235].) He is not fully compensated upon receiving his salary payments because, in addition, he has then earned certain pension benefits, the payment of which is to be made at a future date. While payment of these benefits is deferred, and is subject to the condition that the employee continue to serve for the period required by the statute, the mere fact that performance is in whole or in part dependent upon certain contingencies does not prevent a contract from arising, and the employing governmental body may not deny or impair the contingent liability any more than it can refuse to make the salary payments which are immediately due. Clearly, it cannot do so after all the contingencies have happened, and in our opinion it cannot do so at any time after a contractual duty to make salary payments has arisen, since a part of the compensation which that employee has at that time earned consists of his pension rights. *856
 To hold otherwise would defeat one of the primary objectives in providing pensions for government employees, which is to induce competent persons to enter and remain in public employment. (See Whitehead v. Davie, 189 Cal. 715, 717 [209 P. 1008]; Board of Directors v. Nye, 8 Cal.App. 527, 545 [97 P. 208]; Talbott v. Independent School Dist. of Des Moines, 230 Iowa 949 [299 N.W. 556, 563, 137 A.L.R. 234, 243]; State ex rel. Sena v. Trujillo, 46 N.M. 361 [129 P.2d 329, 332, 142 A.L.R. 932]; Giannettino v. McGoldrick, 295 N.Y. 208 [66 N.E.2d 57, 59]; 1 Dillon on Municipal Corporations [5th ed., 1911],  430.) It is obvious that this purpose would be thwarted if a public employee could be deprived of pension benefits, and the promise of a pension annuity would either become ineffective as an inducement to public employees or it would become merely a snare and a delusion to the unwary. (See Gibson v. City of San Diego, 25 Cal.2d 930, 934-935 [156 P.2d 737]; England v. City of Long Beach, 27 Cal.2d 343, 348 [163 P.2d 865].)
 [8] Accordingly, we conclude that petitioner has a vested pension right and that respondent city, by completely repealing all pension provisions, has attempted to impair its contractual obligations. This it may not constitutionally do, and therefore the repeal is ineffective as to petitioner. (Indiana ex rel. Anderson v. Brand, 303 U.S. 95 [58 S.Ct. 443, 82 L.Ed. 685, 113 A.L.R. 1482]; cf. Lynch v. United States, 292 U.S. 571 [54 S.Ct. 840, 78 L.Ed. 1434]; Perry v. United States, 294 U.S. 330, 349 et seq. [55 S.Ct. 432, 79 L.Ed. 912, 95 A.L.R. 1335].)
 Let a peremptory writ of mandate issue directing respondents to grant petitioner's application for a retirement pension, as provided by section 187, subdivision 2, of the city charter before the repeal.
 Shenk, J., Edmonds, J., Carter, J., Traynor, J., Schauer, J., and Spence, J., concurred.
