
17 Cal.App.4th 1240 (1993)
21 Cal. Rptr.2d 896
RONALD O. RAYGOZA, Plaintiff and Appellant,
v.
COUNTY OF LOS ANGELES et al., Defendants and Respondents.
Docket No. B064989.
Court of Appeals of California, Second District, Division One.
August 13, 1993.
*1242 COUNSEL
Lewis, Marenstein, Wicke & Sherwin and Thomas J. Wicke for Plaintiff and Appellant.
De Witt W. Clinton, County Counsel, and Martha E. Romero, Deputy County Counsel, for Defendants and Respondents.
OPINION
ORTEGA, J.
We reverse the trial court's decision denying appellant Ronald Raygoza's petition for a writ of mandate compelling reinstatement to his job.

BACKGROUND
Raygoza, a Los Angeles County deputy marshal, applied for workers' compensation on December 12, 1983, claiming injury to his psyche, as the result of a May 21, 1982, shootout. On October 24, 1986, the Workers' Compensation Appeals Board issued an award to Raygoza, which contained a work restriction that "precluded [him] from situations where he may have to use a weapon."
The Marshal of the Municipal Courts of Los Angeles County sent Raygoza a letter on May 12, 1987, notifying him that the office had no permanent light-duty positions and that the work restriction was incompatible with the duties of a deputy marshal. Raygoza was relieved of duty (fired) and told that if he did not file for retirement within 30 days, the office would do so on his behalf.
Raygoza did not file, so on June 15, 1987, the marshal filed for a disability retirement on his behalf. A year and a half later, on December 13, 1988, the retirement board denied the application. Upon receipt of the decision, Raygoza requested reinstatement of his employment. A January 5, 1989, letter *1243 from the retirement board to the marshal contained the notification that "[p]ursuant to the County Employees Retirement Law of 1937, Government Code Section 31725, when an application for disability retirement is denied the member must be reinstated unless the Department seeks judicial review by filing a petition for writ of mandate no later than 30 days of the mailing of this notice of the Board's action."
The marshal filed such a petition in February 1989. By all accounts, that petition languished, at least in part because the marshal granted Raygoza an open extension to answer. In the meantime, Raygoza sought other remedies. He asked the retirement board for a full administrative hearing.
That hearing was conducted on August 10, 1990, and consisted of Raygoza's testimony and numerous exhibits, including the reports of several doctors. Raygoza "stated that he is completely capable of performing his job duties as a Deputy Marshal for the Los Angeles County. Moreover, [he] was performing those duties from September 1985 until May 1987, when he was advised that due to the work restrictions placed in the Worker[s'] Compensation case that [he] could no longer carry a gun and that he was being relieved from his duties as a [deputy] Marshal. The Board claims that [Raygoza] is not disabled. [One doctor's] report of September 19, 1988 indicated that [Raygoza] suffered from a post-traumatic stress disorder, but that this disability had resolved itself and [Raygoza] was capable of performing his regular duties. [¶] The Application for Disability Retirement was actually filed by the Marshal's Department in that restrictions had been placed on [Raygoza], not to carry a gun.... Raygoza disputes this disability, as well as the Board. [The doctors] agree that [Raygoza] may continue his duties as a Marshal and that his disability had resolved in 1985."
The retirement board found that Raygoza was not disabled and denied the retirement application. The marshal refused to reinstate him and, on March 28, 1991, Raygoza filed a petition for a writ of mandate seeking reinstatement, the subject of this appeal. The trial court denied the petition on August 14, 1991, and, on a motion for reconsideration, reiterated its order. During those hearings, the parties agreed to consolidate with Raygoza's petition the February 1989 writ petition filed by the marshal. The judgment denying Raygoza's writ petition was filed October 24, 1991. A stipulation, signed by counsel and the trial court, consolidating the marshal's writ petition was filed December 16, 1991.

DISCUSSION
The trial court denied Raygoza relief because all jobs in the department require the carrying of a firearm. The only exception is the temporary duty *1244 of dealing with prisoners. To reinstate Raygoza without a firearm is to pay him a full salary to do nothing.
Government Code section 31725[1] provides that when a county employee is fired for disability, and disability retirement is denied because the evidence does not satisfy the retirement board "that the member is incapacitated physically or mentally for the performance of his duties," the employer may file a petition for a writ of mandate, or join in such a writ filed by the employee, seeking to compel a disability retirement. "If the employer does not do so or if the court upholds the [retirement] board, the section specifically provides that the employer shall reinstate the employee to his job." (McGriff v. County of Los Angeles (1973) 33 Cal. App.3d 394, 399 [109 Cal. Rptr. 186].)
(1) "[T]he purpose of enacting this section was to eliminate severe financial consequences to an employee resulting from inconsistent decisions between an employer and the retirement board concerning the employee's ability to perform his duties. Prior to the enactment of the statute, a local government employer could release an employee on the grounds of physical incapacity, and the retirement board could then deny the employee a pension on the ground that he was not disabled...." (Leili v. County of Los Angeles (1983) 148 Cal. App.3d 985, 988 [196 Cal. Rptr. 427].)
Phillips v. County of Fresno (1990) 225 Cal. App.3d 1240 [277 Cal. Rptr. 531], involved a deputy sheriff who suffered from physical and mental problems. He had killed a man in a shootout and suffered posttraumatic stress disorder. He injured his neck during a training exercise. He was hit by a car and required knee surgery. All in all, he was in pretty bad shape. The retirement board, however, concluded he was just fine and had exaggerated his injuries. The sheriff admitted to being astounded at the board's decision and told Phillips "his injuries created too many liabilities to allow him to return to active duty and a doctor's release would be a necessary precondition to his reinstatement." (Id. at p. 1245.) Phillips opined his doctors would not release him.
The trial court granted Phillips's writ petition and the appellate court affirmed, stating: "The employer cannot deny disability retirement on the basis of there being no disability and then claim disability in order to deny employment income. If the employer and Retirement Board do not agree that the employee is entitled to disability retirement, the employer's recourse is to seek judicial review of the Retirement Board's decision. If review is not pursued, the employee must be reinstated. Section 31725 recognizes no *1245 middle ground." (Phillips v. County of Fresno, supra, 225 Cal. App.3d at p. 1258.)
(2) Respondent County of Los Angeles here points out that the marshal filed a petition for a writ of mandate, which has never been acted on. Thus, it argues, one of the section 31725 requirements for granting Raygoza relief is missing. And, the county argues, the petition has lain dormant for all these years because of the open extension granted Raygoza and his failure to respond to the petition.
The only interpretation we can put on the record supplied us on appeal is that the stipulation to join the marshal's February 1989 petition with Raygoza's rejected 1991 petition, effected a denial of the 1989 petition. Even though the stipulation was filed after judgment was entered on the 1991 petition, the consolidation was discussed and agreed to at both the hearing on the 1991 petition and the hearing on the reconsideration motion. In fact, respondent's counsel stated during the reconsideration motion that "we agreed that this  that the earlier [1989] case, for all intents and purposes, was the same case as this [1991] case."
The 1989 petition having been denied, the retirement board's decision has been upheld. Therefore, all the requirements of section 31725 were met and Raygoza must be reinstated.
(3) We appreciate the dilemma in which the marshal finds himself. But the statute is plain on its face and makes no exception for a situation where the employer claims to have no job available in light of a workers' compensation restriction. And we appreciate the county's argument that several cases which have required reinstatement did so where the department involved had limited duty positions. (See Craver v. City of Los Angeles (1974) 42 Cal. App.3d 76 [117 Cal. Rptr. 534]; O'Toole v. Retirement Board (1983) 139 Cal. App.3d 600 [188 Cal. Rptr. 853]; and Stuessel v. City of Glendale (1983) 141 Cal. App.3d 1047 [190 Cal. Rptr. 773].) But none of those cases involved the peculiar situation we have here where a disagreement between the retirement board and the Workers' Compensation Appeals Board would leave the employee completely out in the cold and render section 31725 meaningless.
Craver held merely that a policeman who can still perform some jobs within the department is not entitled to a disability retirement pension. Section 31725 was not mentioned in the opinion.
In O'Toole, a policeman filed for a disability pension even though there were positions in the department he could occupy. He was denied the *1246 pension, but the trial court issued a writ of mandate directing the retirement board to rehear the matter. The appellate court reversed saying he was not entitled to disability retirement as long as he was capable of performing some available job in the department. The factual dispute was over whether limited duty jobs existed. In spite of the police chief's denial, the court held the evidence incontrovertibly showed the existence of such jobs. Section 31725 was not mentioned in the opinion.
Stuessel involved the same considerations as Craver and O'Toole and did not mention section 31725.
In Barber v. Retirement Board (1971) 18 Cal. App.3d 273 [95 Cal. Rptr. 657], a fireman who had lost a leg asked for a writ of mandate asking that an order retiring him be set aside and compelling the department to keep him on the job. He lost and received his disability retirement. The court did not deal with section 31725.
In all the above cases, the net result of the courts' interpretations is that the employee either is given a disability pension or placed into a full-time, full-pay limited duty position. Here, by contrast, the dispute between the bureaucratic agencies leaves Raygoza unretired and unemployed.
The set of circumstances here is admittedly strange. Raygoza applies for and gets a workers' compensation award because his "psyche" has been damaged by the shootout, but a restriction attached to the award prohibits him from carrying a weapon. Not unreasonably, the marshal concludes he has no use for a gunless deputy. Raygoza, however, does not want to retire and forces the marshal to file an application, and later a writ petition, seeking retirement for him. Before the retirement board Raygoza, now cured (perhaps by the workers' compensation award?), maintains he can handle a gun and the job. The retirement board declines to order a disability pension. But Raygoza is still restricted from carrying a weapon because of the prior injury to his "psyche." So far as the marshal is concerned, Raygoza is disabled.
They cannot all be right. Raygoza is either fit or not. If he is, the marshal faces the uncomfortable prospect of putting an armed man on duty who once suffered a psychic injury connected to firearms. If Raygoza is unfit, he should be retired. But the retirement board has already eliminated that prospect. The result is that, whether Raygoza is truly fit or not, he is deemed fit, leaving the marshal the unpalatable chore of putting back on the payroll one he no doubt considers a liability and a danger.
"Section 31725 does not except from mandatory reinstatement those employees who are not permanently disabled according to a retirement *1247 board, but who are not presently ready to return to work according to the employer. Nor does it appear from the legislative history that the Legislature intended such an exception. To provide for such an exception, the Legislature could have included language to that effect. [Citation.]" (Phillips v. County of Fresno, supra, 225 Cal. App.3d at p. 1257.)
The Legislature decided that an employee in this situation either stays on the job or is given disability retirement. It, in essence, left the decision up to the retirement board. The Legislature's intent is plain. Raygoza cannot be denied both work and disability retirement. If there is a hole in the statutory scheme, the county has to go to the Legislature for a patch.
We must also reject the county's suggestion that Raygoza be required, under section 31725.5, to transfer to another county department where he can fill a job not requiring a weapon. Section 31725.5 applies only if the retirement board "finds, on medical advice, that a member in county employment, although incapacitated for the performance of his duties, is capable of performing other duties in the service of the county[.]" The retirement board found Raygoza capable of performing the duties of a deputy marshal, including the carrying of a firearm.

DISPOSITION
The judgment is reversed. The matter is remanded to the trial court with instructions that it enter a new and different order issuing the writ of mandate.
The parties are to bear their own costs on appeal.
Spencer, P.J., and Masterson, J., concurred.
Respondents' petition for review by the Supreme Court was denied November 17, 1993.
NOTES
[1]  All further statutory references are to the Government Code.
