
17 Cal.2d 356 (1941)
MARY ESTELLE SWEESY, Appellant,
v.
LOS ANGELES COUNTY PEACE OFFICERS' RETIREMENT BOARD et al., Respondents.
L. A. No. 17579. 
Supreme Court of California. In Bank.  
February 17, 1941.
 Francis A. Cochran and Carl B. Sturzenacker for Appellant.
 J. H. O'Connor, County Counsel, and Beach Vasey and A. Curtis Smith, Deputy County Counsel, for Respondents.
 SHENK, J.
 Mary Estelle Sweesy filed in the Superior Court in Los Angeles County a petition for a writ of mandate praying that the respondents be directed to order the payment to her of certain monthly instalments under the 1937 amendment to the County Peace Officers' Retirement Act (Stats. 1937, p. 664). The trial court sustained a demurrer to the petition without leave to amend. The petitioner appealed from the judgment of dismissal which followed the court's order.
 The Los Angeles County Peace Officers' Retirement Board exists pursuant to an act entitled, "An Act to Authorize the Counties of the State of California to establish systems for the Retirement and Pension of Certain County and Township Officers and Employees, namely, County Peace Officers as Defined in the Act, and to Provide Certain Benefits for their Dependents, and Empowering County Boards of Supervisors to Levy a Special Tax." (Stats. 1931, p. 477 [Deering's *358 Gen. Laws 1937, Act 5848].) The Board of Supervisors of Los Angeles County accepted by ordinance the provisions of said act in 1934, whereupon Norris M. Sweesy became a member of the pension system as contemplated by the provisions of the act. Sweesy was employed by the county of Los Angeles as a peace officer, to wit, a deputy sheriff, from January 13, 1911, until May 31, 1935, when, having arrived at the age of fifty-five years and having served more than twenty years as such county peace officer, his retirement was ordered by the Retirement Commission. From the time the system was accepted by the Board of Supervisors of Los Angeles County to the date of his retirement, Sweesy contributed the specified percentage of his salary to the retirement fund. After his retirement he was subject to call for performance of services as a deputy sheriff in cases of emergency. In 1937 the legislature adopted the amendment to section 11 of the act. By the amendment the widow of a retired peace officer became entitled to a pension of $75 per month until her death or remarriage, provided she had been married to the deceased pensioner at least five years prior to the date of his retirement.
 In addition to the foregoing, it was alleged that Sweesy died on February 26, 1939; that the petitioner was then and had been married to him for more than five years; that she had not remarried; and that under the act she was entitled to the pension. It was also alleged that the petitioner had made application for the pension provided by the amendment of 1937, and that her application had been denied by the Retirement Board on the sole ground that the widow of a member who had retired from service prior to the effective date of the amendment to section 11 of the act was not eligible to receive pension payments thereunder.
 It is apparent that the trial court sustained the demurrer on that ground. For the purpose of the discussion of the question presented we shall assume that the petitioner has stated facts which otherwise bring her within the terms of the amendment. Thus, the question is whether the widow of a retired pensioner is entitled to a widow's pension rights created by an amendment adopted after the retirement but before the death of the retired member of the pension system.
 Prior to the amendment of 1937, the act made provision for pension payments to surviving widows of pensioners who became *359 retired by reason of disability ensuing from service. The 1937 amendment purports to extend the provisions for widows' pensions to widows of members retired by reason of age and years of service, and no question arises herein in that respect. It is expressly stated in amended section 11 that its provisions shall be retroactive as to the past service of any member who shall be entitled to the benefits "contained herein."
 It is contended on the part of the respondents that in order to avoid constitutional invalidity the amendment may operate prospectively only; and that such prospective operation contemplates pensions to surviving widows of pensioners only who were in active service at the time of the adoption of the amendment, that is, members who were in active as distinguished from retired service, or who later entered such active service. It is argued that if the amendment by the prescribed retroactive operation grants a pension to the widow in this case, it amounts to a gift of public money and is in violation of constitutional prohibitions; and that in any event the prescribed retroactive operation refers only to past service of members on active duty at the time of the amendment, as distinguished from retired members.
 On the other hand the petitioner relies on cases such as Home v. Souden, 199 Cal. 508 [250 P. 162]; O'Dea v. Cook, 176 Cal. 659 [169 P. 366]; Kavanagh v. Board of Police Pension Fund Commrs., 134 Cal. 50 [66 P. 36]; Klench v. Board of Pension Fund Commrs., 79 Cal.App. 171 [249 P. 46]; Aitken v. Roche, 48 Cal.App. 753 [192 P. 464], which she contends require the payment of the pension to her as surviving widow of a retired member.
 In Home v. Souden, supra, the member was killed while performing duties as an employee of the fire department of the city of Los Angeles. At the time of his death his widow became entitled to a pension equal to one-third of the salary attached to the rank held by her husband at the time of his death. Subsequently the yearly pension was increased to one- half the amount of such salary. This court, relying on O'Dea v. Cook, Kavanagh v. Board, etc., and Aitken v. Roche, supra, held that the widow was entitled to the increase and that there was no merit in the contention that the increase constituted a gift of public money. The decision in O'Dea v. Cook, supra, recognized that a pension ordinarily is not a gift or gratuity. It was there said: "A pension is a gratuity *360 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, services are rendered under 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." (See, also, Klench v. Board of Pension Fund Commrs., supra, p. 185.)
 In the Kavanagh case, supra, Kavanagh had served for more than twenty years as a police officer and had been retired on a pension. After his death from natural causes his widow applied for payment to her of $1,000 pursuant to an amendment enacted prior to Kavanagh's retirement. The amendment provided that whenever a member of the police department after ten years service died from natural causes his widow should be entitled to $1,000 from the fund. The question was whether Kavanagh after retirement was a member of the department so as to entitle his widow to the payment prescribed by the amendment. The retired officer was required to perform duties in case of emergency and to report to the department at stated times. Membership in the pension system could be terminated by death, resignation or dismissal. Following the policy approving liberal construction of pension laws, the court held that retirement did not terminate membership on the police force or in the department; that the retired officer was still a member of the force at the time of his death; and that his widow was entitled to the specified payment.
 In Klench v. Board of Pension Fund Commrs., supra, it was held that under the law there involved a pensioner was entitled to the benefits afforded by the increases in the pay attached to the rank he held at the time of his retirement, and that his right to payment was not limited to the amount he was receiving at the time of his retirement. The conclusion was based on the observation that one who has been regularly placed on the pension roll is entitled to all the benefits of the system. The case followed Aitken v. Roche, supra, wherein it was held that under the system and the charter provisions the pensioner was afforded the benefits of subsequent increases in the pay attached to the rank he held at the time of retirement. (See, also, Rumetsch v. Davie, 47 Cal.App. 512 [190 P. 1075]; Jones v. Cooney, 82 Cal.App. 265 [255 P. 536].) *361
 [1-3] It must be accepted as the settled law of this state that unless the contrary intention plainly appears persons having a pensionable status are entitled to receive any increase of benefits which may be provided. Sweesy's pension rights vested at the time he was retired from service, that is, upon the happening of the contingency upon which the pensionable right depended. (O'Dea v. Cook, supra; Kavanagh v. Board of Police Pension Fund Commrs., supra; Jordan v. Retirement Board, 35 Cal.App.2d 653 [96 PaCal.2d 973].) In Whitehead v. Davie, 189 Cal. 715, 719 [209 P. 1008], it was recognized that provisions creating a pension system could properly have a retroactive operation, if such intention clearly appeared. (See, also, Jordan v. Retirement Board, supra.)
 [4] In view of the foregoing decisions the contentions of the petitioner must be held to prevail over those of the respondents. Sweesy had a status as a pensioner at the time of the adoption of the amendment granting pensions to widows of retired members of the department. The provisions were made expressly retroactive so as to include past service of any member entitled to the benefits "contained herein." Unquestionably Sweesy was a member entitled to the benefits of the system. No distinction is made by the legislature between members in active duty on full pay and those on retirement, in so far as the retroactive provisions are concerned, and no distinction may here be drawn on that basis. Therefore, the provisions must be held to apply to members who had a vested as well as to those who merely had an inchoate right to members' pension benefits at the time of the adoption of the amendment. That the widow's pension affords a benefit to the pensioned member cannot be gainsaid. A pensioned member, as has been held, is as much entitled to increased benefits of the pension system as is any other member, unless the legislative body clearly indicates that such application is contrary to its intention. A provision for a pension to his widow obviously benefits the member's economic status in a way similar to an increase of his wages or pension. The problem cannot be solved merely by stating as a proposition that a provision will not be upheld which purports to grant a pension after the completion of the services for which the pension is contemplated as additional compensation. The law is well settled that additional benefits may constitutionally be provided for members of the system who have acquired a pensionable status. This is not a case where the member was already retired *362 and whose services were terminated before the creation of the pension system. There is some language in the decisions which refers to pension benefits as additional or increased compensation for services performed and to be performed. (O'Dea v. Cook, supra; Jordan v. Retirement Board, supra; Douglas v. Pension Board, 75 Cal.App. 335, 340 [242 P. 756], citing cases.) But that designation may not be strictly accurate in every case. As in this case, the members of the system make contributions to the pension fund, even though contributions may also come from public funds. Such systems are usually founded on actuarial calculations. Therefore, the question of what benefits would be warranted by either the individual or mass contributions to the fund is for the legislative body, and not for the pension board or the courts, whose respective functions in such cases are to administer and interpret the provisions of the law as written. An appropriate restriction of the widow's rights under such a system is indicated by the requirement that the applicant must have been married to the member five years prior to his retirement, if he was retired, or five years prior to his death if he died from injuries received in the performance of his duties. Those provisions and the assumed facts herein serve to distinguish this case from Jordan v. Retirement Board, supra. In the latter case the pension law required that the widow be married to the decedent prior to the injury which resulted in his death. The widow had not married the pensioner prior to the injury which subsequently and during retirement resulted in his death, and for that reason was not entitled to the pension.
 [5] It is not to be understood from the foregoing, however, that the provision for an increase in benefits to the retired member by means of a pension to his widow becomes a vested right prior to the happening of a contingency upon which the payment of the widow's pension depends. As aptly shown by the decision in Jordan v. Retirement Board, supra, the grant of a pension to the member's widow is an increase of benefits which may be taken away before the right vests by the happening of the event calling for the fulfillment of the grant. In this case the provision for pension to members' widows benefits all members, whether on active or retired duty; but as to any prospective grantee of the pension it is an inchoate right which may be taken away at any time before it becomes vested in her. *363
 The case of Lamb v. Board of County Police Officers' Retirement Com., 29 Cal.App.2d 348 [84 PaCal.2d 183], has no persuasive force herein. In that case there was no applicable pension system in existence at the time the officer was retired for disability resulting from performance of duty. The answer to the question whether a pensionable status may be created retroactively to include persons who had already been retired may not afford a guide in resolving the question whether an amendment to the pension law may afford additional benefits by way of a widow's pension to members who already had acquired a retired pensionable status under the law. It does not follow that because the pension would be a gratuity in the one case, it also is in the other. This state and other states (see People v. Board of Trustees of Firemen's Pension Fund, 103 Colo. 1 [82 PaCal.2d 765, 118 A.L.R. 984]; Board of Trustees of Policemen's Pension Fund v. Schupp, 223 Ky. 269 [3 S.W. (2d) 606]), recognize that increased benefits to one already having a pensionable status are constitutional and economically appropriate. The amendment in the present case is one providing for such an increase of benefits, and must therefore be held to be valid and constitutional as it applies herein, provided the petitioner can prove the facts which are required to bring the amendment into operation.
 [6] The foregoing requires a reversal of the judgment based upon the order sustaining the demurrer without leave to amend. However, an uncertainty appears on the face of the petition which leaves the application of the amendment to the facts in some doubt, but this is a matter which may be rectified by amendment, if the petitioner sees fit so to amend.
 The petitioner alleges that the amended section of the retirement act entitles the widow of a retired member to payment of the pension provided she shall have been married to the pensioner at least five years prior to the date of his retirement. The petition shows that the decedent was retired in May, 1935, and died in February, 1939. The petitioner then alleges that she was the wife of the decedent at the date of his demise and for more than five years prior to his death. These allegations would not show compliance with the alleged requirement of the amended section.
 The judgment is reversed with directions to the trial court to permit an amendment to the petition, if requested, so that the petitioner may allege sufficient facts to bring herself *364 within the purview of the amendment to the pension act, and then to proceed in accordance with the foregoing conclusions.
 Traynor, J., Curtis, J., Carter, J., Edmonds, J., and Gibson, C.J., concurred.
