
747 P.2d 246 (1987)
CITY OF ALBUQUERQUE, Sam Baca and Gene Romo, Plaintiffs/Respondents-Appellants,
v.
Linda RYON, Defendant/Petitioner-Appellee.
No. 17007.
Supreme Court of New Mexico.
December 21, 1987.
*247 James H. Foley, City Atty., Judy K. Kelley, Asst. City Atty., Albuquerque, for plaintiffs/respondents-appellants.
Glass, Fitzpatrick & Bolnick, Ira Bolnick, Albuquerque, for defendant/petitioner-appellee.

OPINION
WALTERS, Justice.
Respondents, City of Albuquerque (City), Sam Baca, Chief of the Albuquerque Police Department (Baca), and Gene Romo, Chief Administrative Officer (CAO), appeal the District Court's issuance of a permanent writ of mandamus directing the City's compliance with an administrative order reinstating Petitioner Ryon to employment with the City. Following issuance of the order, the City brought a declaratory judgment action; Petitioner filed an independent petition for writ of mandamus. In her petition, Ryon requested enforcement of the administrative order which mandated the City to reinstate her in a job commensurate with the position she had held before the City wrongfully terminated her on March 2, 1986, and to pay back pay from March 2nd until placement. In its action, the City sought to have the district court require Ryon, as a condition to reinstatement, to provide doctor's proof that she was able to work from March 2nd to the time of reinstatement or, in the alternative, that she not be reinstated or receive back pay until a worker's compensation claim filed after her termination had been resolved. The court consolidated the cases and, after evidentiary hearings, dismissed the City's declaratory action and entered an order and writ of mandamus requiring Baca and the CAO to comply with the previously issued administrative order. We affirm.
Ryon, employed by the City as a civilian security officer with the Albuquerque Police Department (APD), worked for the City for six-and-a-half years. On February 27, 1986, she left work, with permission, and was absent thereafter on March 2, 3, and 4, 1986. The City put her in "automatic resignation" status pursuant to a city regulation that deems an employee who is absent from work for three consecutive days, without authority, to have resigned.
*248 Ryon filed a grievance under the City's Personnel Ordinances. At the hearing in May of 1987, her supervising sergeant admitted that on the third day of Ryon's absence her roommate and co-worker had called on her behalf to report that Ryon was sick. Ryon subsequently filed a claim for worker's compensation alleging stress and resulting injuries suffered on February 27th. The hearing officer concluded on June 10, 1986, that Ryon had obtained the necessary authorization for her absence, had been under a doctor's care, and that it was error for the police department to have construed Ryon's absence as an automatic resignation. On the same day, the CAO adopted the hearing examiner's conclusions and ordered Ryon's reinstatement and back pay.
When the payroll division of APD received the CAO's administrative order on June 17th and learned of the testimony before the hearing officer, it adopted the view that but for the automatic resignation imposed by the City, Ryon would have been out on sick leave; that once her sick leave ran out, she would have been placed on physical layoff without pay. Rather than to seek an amendment to the order that would adopt its analysis for back-pay calculation, or to appeal the order as provided in the City's grievance procedure, the City imposed certain conditions on Ryon's reinstatement and refused to pay any back pay until those conditions had been met. Finally, and on October 16, 1986, after Ryon had refused to meet the conditions, the City filed its suit for declaratory judgment.
In compliance with the trial court's writ of mandamus, the City reinstated Ryon. The City challenges the trial court only as its writ relates to back pay and argues:
1. Mandamus is not proper here because the act Ryon seeks to compel is unclear, disputable and discretionary.
2. Mandamus was improper because Ryon had a plain, speedy and adequate remedy at law.
3. Ryon's exclusive remedy is under the New Mexico Workmen's Compensation Laws or, alternatively, she elected that remedy.
We address each argument in turn.

1. Was mandamus a proper remedy in this case?
Mandamus is appropriate only when the petitioner has a clear legal right to be enforced. Lease v. Board of Regents of New Mexico State University, 83 N.M. 781, 498 P.2d 310 (1972); Witt v. Hartman, 82 N.M. 170, 477 P.2d 608 (1970). Ryon had a clear and enforceable legal right. The city ordinance provided a grievance procedure through which she could obtain an order of reinstatement and back pay, which she pursued. Legislatively authorized rules and regulations have the force of law. Jaramillo v. Fisher Controls Co., Inc., 102 N.M. 614, 698 P.2d 887 (Ct.App. 1985). The City of Albuquerque Merit System Ordinance No. 52-1978 is promulgated by authority of NMSA 1978, Section 3-13-4 (Repl.Pamp. 1985). That ordinance provides that a decision of the CAO may be appealed to district court within ninety days of the decision. City Merit System Ordinance No. 52-1978, § 2-9-25(8). Upon expiration of the appeal period the order became final. The CAO's order conferred upon Ryon a clearly enforceable right: reinstatement and back pay. In the absence of an appeal, the order created a binding duty upon the City to reinstate Ryon and upon APD to pay her back pay from March 2, 1986.
The City failed to avail itself of the procedure provided to resolve its perceived quandary regarding calculation of the ordered back pay. Having waived the appellate route, the City may not now be heard to argue that uncertainty in the amount of back pay to be made is a defense to a mandamus action seeking reinstatement and repayment. Mandamus was appropriate to compel Respondents to comply with the June 10, 1986, order.

2. Did Ryon have a plain, speedy and adequate remedy at law?
According to the City, the district court improperly issued its writ because the declaratory judgment action brought by the City provided Ryon with an adequate *249 remedy at law. It is true that a "writ shall not issue in any case where there is a plain, speedy and adequate remedy in the ordinary course of law." NMSA 1978, § 44-2-5. Reliance by the City on this rule because of the pending declaratory action completely ignores, however, the finality of the fact that Ryon had exhausted her administrative remedies and had obtained an order mandating the City to reinstate her and pay her back pay long before the City attempted to reach by a declaratory judgment suit what it had waived by failure to timely appeal. Relief appropriate for Ryon was to demand the City's compliance with the order; mandamus was the appropriate vehicle for Ryon to obtain that compliance.
In this regard, the trial court properly dismissed the declaratory judgment action. The purpose of declaratory judgment is "to settle and to afford relief from uncertainty and insecurity with respect to rights, status and other legal relations * * * *" NMSA 1978, § 44-6-14. It also serves to relieve litigants of the common-law rule that no declaration of rights may be adjudged absent a violation of a right. 22 Am.Jur.2d Declaratory Judgments § 6 (1965). A declaratory action certainly could have clarified the method of calculating Ryon's back pay. But declaratory judgment actions are not intended to provide a substitute for other available actions. Id. The City's attempt to substitute the declaratory action for its expired right to request reconsideration of or to appeal the CAO's final order warranted dismissal of its suit. Furthermore, declaratory judgment actions are subject to the same limitations as the nature of the action sued upon in the underlying case. Taylor v. Lovelace Clinic, 78 N.M. 460, 432 P.2d 816 (1967). In Taylor, the court dismissed a declaratory judgment action because the statute of limitations had run on the underlying action. Here the City's right to appeal had expired and with it so had its right to request amendment of the order to accommodate its contention that Ryon, if she had not been wrongfully terminated, might have been too ill to work.

3. Was Ryon's exclusive remedy under the worker's compensationd she elect her remedy?
The City finally argues that worker's compensation laws provide the exclusive remedy to recover benefits from the City for claims arising from an on-the-job injury. NMSA 1978, § 52-1-9 (Repl.Pamp. 1987). Alternatively, the City argues that the doctrine of election of remedies bars Ryon's writ of mandamus action. These arguments have no merit. The effect of the order of reinstatement and back pay upon Ryon's worker's compensation claim is not before us, and we are not called upon to determine the validity of any pending worker's compensation case. What may appear to be a defense in that matter has no bearing upon the issues in this appeal.
We affirm the lower court's issuance of a writ of mandamus. The City of Albuquerque Police Department is ordered to reinstate Ryon and to pay her all back wages and benefits from the time of her wrongful termination to her reinstatement.
IT IS SO ORDERED.
SCARBOROUGH, C.J., and RANSOM, J., concur.
