
46 Cal.2d 786 (1956)
LLOYD R. WENDLAND, Respondent,
v.
CITY OF ALAMEDA et al., Appellants.
S. F. No. 19410. 
Supreme Court of California. In Bank.  
June 28, 1956.
 J. P. Clark, City Attorney, for Appellants.
 J. W. O'Neill for Respondent.
 GIBSON, C.J.
 Plaintiff, a former police officer of the city of Alameda, brought this proceeding for a writ of mandate to compel defendants to pay him a pension. Judgment was for plaintiff, and defendants have appealed.
 The facts are undisputed. Plaintiff was employed by the city on February 13, 1926, and he served continuously as a police officer for more than 25 years, making monthly contributions to the city's pension fund. On December 3, 1951, he was subpoenaed as a witness before the grand jury of Alameda County in connection with an investigation of bookmaking, and he refused to testify on the ground that his testimony might tend to incriminate and degrade him. The city manager discharged him on the same day, stating that the refusal to testify was conduct unbecoming an officer. Plaintiff did not seek a review, and the question of the propriety of the discharge is not before us. (Cf. Slochower v. Board of Higher Education of City of N.Y., 350 U.S. 551 [76 S.Ct. 637, 100 L.Ed. __________].)
 Plaintiff's application for a pension was denied by the city's pension board on the ground that he was discharged for the commission of an offense which impaired the efficiency of the police department and that, under the terms of the pension ordinance, a person who is dismissed for such an offense forfeits the right to a pension. Plaintiff thereupon commenced this proceeding.
 The sections of the ordinance are divided into lettered paragraphs, and, for convenience, we shall refer to each such paragraph as a separate section. [1] Section 2(a), upon which plaintiff rests his claim, remained unchanged throughout the period of his employment. It provides, in substance, that whenever any member of the police department shall have served for a period of 25 years or more, he shall, upon request, be retired and paid a monthly pension equal to one-half the salary paid to members of the rank which he held one year previous to the date of his retirement. Under a provision such as this, the discharge of a member for *788 cause after he has served for the required period does not preclude him from receiving a pension (cf. Skaggs v. City of Los Angeles, 43 Cal.2d 497 [275 P.2d 9]), and plaintiff is clearly entitled to a pension unless some other portion of the ordinance operates to exclude him. The only provision which might have such an effect is section 5.
 Section 5, as it read when plaintiff entered into employment of the city, provided: "Any person having served ten (10) years or more as a member of the ... Police Department shall, if he be removed ... for any cause other than conviction of a felony; notorious or consecutive insubordination or neglect of duty, or in case of voluntary or involuntary resignation, be entitled to all the provisions of Section 2 of this ordinance, in the proportion that the number of years he has served ... bears to twenty-five (25) years."
 In 1943, more than 17 years after plaintiff commenced employment as a police officer, section 5 was amended to read, in part, as follows: "If any person who has served ten (10) years or more as a member of the ... Police Department be discharged ... for any reason, except a dismissal for neglect of duty, insubordination, conviction of a felony or of a misdemeanor involving moral turpitude, or a dismissal for any offense, which offense impairs the efficiency or discipline of the department, such person shall be entitled to all the benefits and provisions of Section 2 of this ordinance, in the proportion that the number of years he has served ... bears to twenty-five (25) years."
 Plaintiff was denied a pension on the theory that his refusal to testify before the grand jury amounted to an offense which impaired the efficiency of the department, within the meaning of section 5 as amended in 1943, and that under this provision a dismissal for such an offense terminated his pension rights. Plaintiff argues that his pension rights are governed solely by section 2(a); that even if it be assumed that section 5 is applicable to him, his conduct did not amount to an offense within the meaning of the exceptions stated in the 1943 amendment; and that the amendment, if applied to him, would unconstitutionally impair his vested contractual rights. We are of the view that section 5 is not applicable to plaintiff, and, accordingly, there is no occasion for us to consider the remaining points which he urges.
 [2] Section 5 was one of several different provisions of the ordinance which created separate, complete types of *789 pension benefits.  [fn. *] The terms of this section, as it existed before the 1943 amendment, plainly show that it provided a distinct pension not included in any of the other sections, namely, a proportionate benefit payable to certain members who were discharged for cause after they had served for 10 years. It is also clear that before the amendment the exceptions mentioned in section 5 applied only to the benefit there conferred and not to payments provided by any other section of the ordinance. After the amendment, the portion of the section involved here continued to provide for a separate proportionate benefit payable to a member discharged for cause after 10 years' service. While the exceptions contained in this portion of the amended section are different from those set forth in the original provision, all of these exceptions, including a dismissal for an offense impairing the efficiency of the department, are applicable, as before, solely to the pension benefit authorized by section 5.  [fn. ] These exceptions, therefore, do not apply to the benefits allowed by section 2(a). *790
 The question is whether plaintiff's rights to a pension are governed by section 2(a) or section 5. If section 2(a) applies, then plaintiff is entitled to a pension whether or not he was discharged for an offense which impaired the efficiency of the department. If, however, section 5 is controlling, then the exception with respect to such a discharge precludes plaintiff from receiving a pension unless the exception is inoperative for one of the other reasons which he urges.
 [3] Section 2(a) directly refers to a member who has served for "twenty-five ... years or more," and, as we have seen, the language is sufficiently broad to authorize payment of a pension to a person who was discharged for cause after serving for such a period. (Cf. Skaggs v. City of Los Angeles, 43 Cal.2d 497 [275 P.2d 9].) Section 5, however, contains no declaration that it is applicable to a member who has served for 25 years or more. Section 2(a), of course, does not apply to anyone who has served for less than 25 years, and, when the ordinance is viewed as a whole, it may reasonably be construed to provide that all persons who have served for 25 years or more, including those discharged for cause, are covered by section 2(a), and that section 5 applies only to persons who have served for less than that period. As so interpreted, section 5 preserves a proportionate share of the accrued pension rights of a member who is dismissed for a relatively minor offense before he has been employed long enough to obtain a full retirement pension under section 2(a), but it does not operate to destroy the accumulated credits of a person who has served for the entire period required for such a pension. The ordinance may well have been designed to place greater restrictions upon the allowance of a pension to a person who was discharged before he had served a sufficient time to entitle him to retirement than upon a person who remained in employment after service of such period. Clearly we could not hold it unreasonable for a legislative body to induce persons to remain employed after reaching retirement age by providing that they would not risk loss of their fully earned and accrued pension rights if they should do something improper while serving such additional time.
 Moreover, this construction of section 5 will avoid the anomalous result which might occur if we were to assume that the benefits authorized by section 5 were available to a person who had served more than 25 years, because, in such event, a person discharged for cause could, under a literal application of the provision, receive a larger pension than a *791 member who had retired after the same length of service. For example, under this assumption, a member discharged after serving 30 years might, by the terms of section 5, be entitled to a pension amounting to 30/25 of one-half of his salary, since the section authorizes a pension "in the proportion that the number of years he has served ... bears to twenty- five (25) years." On the other hand, a person who retired under section 2(a) after being employed for 30 years would receive a pension amounting only to half his salary.
 [4] If there is any doubt as to the proper interpretation of the ordinance, we are, of course, required to construe the provisions liberally in favor of the applicant so as to carry out their beneficent policy. (See Terry v. City of Berkeley, 41 Cal.2d 698, 701-702 [263 P.2d 833]; England v. City of Long Beach, 27 Cal.2d 343, 346-347 [163 P.2d 865]; Gibson v. City of San Diego, 25 Cal.2d 930, 935 [156 P.2d 737].) We conclude that section 5 is not applicable to plaintiff and that he is entitled to a pension under section 2(a).
 The judgment is affirmed.
 Shenk, J., Carter, J., Schauer, J., Spence, J., and McComb, J., concurred.
 Section 3(a) provides, in substance, for a disability pension to be paid to any member of the police department who became physically disabled as a result of injury received in the performance of his duty or from any illness or disease peculiar to the work of a policeman. Section 3(b) provides that upon the death of such a pensioner, certain benefits should be paid to his widow or children or dependent parents. Sections 3(c) and (d) impose certain limitations upon the benefits.
 Section 4 in effect extends the benefits of section 3(b) to include the dependents of any member of the police department who should lose his life as a result of injury in the performance of his duty or as a result of illness or disease peculiar to his work.
 Section 6 provides that certain benefits should be paid to a member of the police department or his widow or children or dependent parents in the event that he should become totally disabled or die from any sickness or accident which was not the result of a performance of duty.
 "No person who has voluntarily or involuntarily resigned shall ever be entitled to a pension under any provision of this ordinance."
 "Should a member of either of said departments die after he had become entitled to retirement under Section 2(a) of this ordinance but before having applied for or having been granted a pension, the persons mentioned in Section 2(b) shall be entitled to receive a pension in the amount and otherwise under the conditions specified in Section 2(b) of this ordinance."
NOTES
[fn. *]  *. Section 2(a), as we have seen, provides in effect for a retirement pension for any member of the police department who served 25 years or more. Section 2(b) provides that upon the death of "said pensioner" certain benefits should be paid to his widow or children or dependent parents.
[fn. ]  . The 1943 amendment added two new provisions which do relate to other sections of the ordinance, but these provisions, in different paragraphs, are separate from the provision containing the exceptions involved here and do not indicate that the exceptions were intended to affect the benefits allowed by other sections such as 2(a). These provisions are as follows:
