
114 Cal.Rptr.2d 62 (2001)
94 Cal.App.4th 52
Robert E. MORRIS, Plaintiff and Respondent,
v.
Jerry L. HARPER, as Director, etc., Defendant and Appellant.
No. A093703.
Court of Appeal, First District, Division Two.
October 31, 2001.
*63 Bill Lockyer, Attorney General of the State of California, David P. Druliner, Chief Assistant Attorney General, Susan D. Lee, Supervising Deputy Attorney General, Matthew D. Mandelbaum, Deputy Attorney General, Counsel for Appellant.
Youth Law Center, Susan L. Burrell, Maria F. Ramiu, Alice Bussiere, Carole B. Shauffer, San Francisco, Counsel for Respondent.
RUVOLO, J.

I.

Introduction
This matter arises out of a petition for writ of mandate filed by respondent Robert E. Morris, M.D., a board certified physician in pediatrics and adolescent medicine, against appellant Jerry L. Harper, then Acting Director of the California Youth Authority (CYA). Morris's petition sought mandamus relief to require Harper to comply with state law by obtaining licenses for the 11 CYA programs meeting the statutory definition of a correctional treatment center.[1] The trial court granted the mandate petition, stating: "[A]lmost five years after the mandatory compliance deadline, [Harper] has yet to license even one facility and is in the process of licensing only three of the eleven facilities. [¶] Given these circumstances, the Court is not convinced that [Harper] is willing to perform without coercion." Harper challenges the trial court's decision, claiming "the superior court's judgment granting the writ of mandate flies directly in the face" of the limited scope of mandamus relief. We disagree and affirm.

II.

Facts and Procedural History
The trial court based its decision on the following facts, which are undisputed by *64 the parties to this appeal. In 1987, the California Legislature created the correctional treatment center licensing category to ensure that inpatient medical services provided in California's correctional facilities met minimum health standards. As part of this program, the Legislature required that correctional treatment centers obtain licenses by January 1, 1994, and prohibited the operation of a correctional treatment center without a license. (§ 1253.)
The Legislature also directed the Department of Health Services to develop regulations governing correctional treatment centers. These regulations were promulgated in 1994 and cover every aspect of the management and operation of correctional treatment facilities, including administration, required services and staffing levels for physicians, psychiatrists, psychologists, nursing, pharmaceutical services, dental and dietary services, professional qualifications and staff training. (Cal.Code.Regs., tit.22, §§ 79597-79701.) The regulations also cover the administration of drugs, the use of clinical restraints and seclusion, the handling of infectious diseases and health records, and physical plant and safety requirements. (Id. at §§ 79773-79861.) In 1993, the Legislature extended the effective date of the correctional treatment center regulations and deferred implementing the licensing requirements until January 1, 1996.
The CYA provides inpatient medical and mental health services in 11 facilities that come within the statutory definition of a correctional treatment center.[2] When Morris filed the instant writ petition on May 11, 2000, the CYA was operating all of its correctional treatment centers without licenses, in violation of sections 1250, subdivision (j)(1) and 1253. The petition for writ of mandate sought to compel Harper, then Acting Director of the CYA, to comply with state licensing requirements for its correctional treatment centers. In the proceedings below, Harper admitted that the CYA provided inpatient health and mental health services in a total of 11 of its institutions qualifying as correctional treatment centers. Harper also admitted that the CYA does not have a license to provide those services. He also admitted that state law prohibits the operation of health facilities, including correctional treatment centers, without a license. (§ 1253.)
Despite these admissions, Harper argued that a writ of mandate should not issue because writ relief was unwarranted under the circumstances presented by this case. He asserted that a writ was improper because the CYA needs the cooperation and approval of third parties in pursuing licensing; because the CYA is actively proceeding towards licensing; because the act to be compelled is not ministerial; and because he has never refused to perform the act to be compelled.
After hearing argument on the matter, the court rejected each of Harper's arguments. The court specifically found that, since Harper chose to operate the correctional treatment centers, he has a clear, present, and ministerial duty to obtain a license for each facility. The court rejected Harper's argument that the writ should not issue because he is "willing" to comply with the prescribed licensing requirements under sections 1250 and 1253, and the *65 regulations promulgated thereunder. The court found that almost five years after the mandatory compliance deadline, Harper has worked toward licensing only three of the 11 facilities, even though inpatient health services are being provided to at least some residents at all 11 facilities. The court pointed to the absence of evidence of any efforts to comply with the law at the other eight facilities. Accordingly, the court rejected Harper's argument that he was willing to comply without coercion.
The court ordered Harper to do several things. First, it directed him to comply with sections 1250 and 1253, and the regulations promulgated thereunder at three CYA facilities by December 28, 2001.[3] Secondly, it directed him to comply with these statutes and regulations at the CYA's eight remaining facilities by December 27, 2002. And third, it directed him to develop a written plan describing the manner of his compliance, to submit this plan to Morris's counsel, and to meet and confer with Morris's counsel regarding the terms of this plan. This appeal followed.

III.

Discussion

A. Standard of Review

A traditional writ of mandate brought under Code of Civil Procedure section 1085 lies "to compel the performance of an act which the law specifically enjoins, as a duty resulting from an office, trust, or station." Under this section, mandate will lie to compel performance of a clear, present, and usually ministerial duty in cases where a petitioner has a clear, present and beneficial right to performance of that duty. (Santa Clara County Counsel Attys. Assn. v. Woodside (1994) 7 Cal.4th 525, 539-540, 28 Cal. Rptr.2d 617, 869 P.2d 1142; County of Del Norte v. City of Crescent City (1999) 71 Cal.App.4th 965, 972, 84 Cal.Rptr.2d 179.) Mandamus has long been recognized as the appropriate means by which to challenge a government official's refusal to implement a duly enacted legislative measure. (City and County of San Francisco v. Callanan (1985) 169 Cal.App.3d 643, 647, 215 Cal.Rptr. 435.)
The parties in this case disagree on the appropriate standard of review. Harper argues that the trial court's issuance of the writ should be reviewed de novo, as a question of law. Morris argues that the appropriate standard requires us to uphold the issuance of the writ if it is supported by substantial evidence. The correct standard is a mixture of these two approaches. "`In reviewing the trial court's ruling on a writ of mandate (Code Civ. Proc, § 1085), the appellate court is ordinarily confined to an inquiry as to whether the findings and judgment of the trial court are supported by substantial evidence. [Citation.] However, the appellate court may make its own determination when the case involves resolution of questions of law where the facts are undisputed. [Citation.]' [Citation.]" (Caloca v. County of San Diego (1999) 72 Cal.App.4th 1209, 1217, 85 Cal.Rptr.2d 660; Dolan-King v. Rancho Santa Fe Assn. (2000) 81 Cal.App.4th 965, 973-974, 97 Cal.Rptr.2d 280; Rodriguez v. Solis (1991) 1 Cal.App.4th 495, 502, 2 Cal. Rptr.2d 50 (Rodriguez).)
The issues in this case do not revolve around the proper interpretation and application of the statute and implementing regulations regarding the licensing of correctional treatment centers which *66 would present purely legal questions. (Rodriguez, supra, 1 Cal.App.4th at 502, 2 Cal.Rptr.2d 50.) Harper does not challenge the overriding proposition which served as the basis for the trial court's issuance of the writthat the CYA has failed to perform its legally-mandated obligation under the Health and Safety Code to license its correctional treatment facilities. Instead, Harper claims writ relief was unwarranted and inappropriate because "mandate has its limits, and ... they have been exceeded here." Specifically, he claims the trial court erred in granting writ relief in this case because the undisputed evidence establishes 1) "that Harper is willing to perform the requested act without coercion"; 2) "the judgment seeks to compel action that requires the cooperation and approval of third parties"; and 3) the judgment "improperly seeks to control the discretion of an administrative agency." Harper claims that these arguments present mixed questions of undisputed fact and law warranting de novo review. Even giving Harper the benefit of the elevated de novo standard of review, we find each of these arguments unavailing because Harper can point to no set of undisputed material facts that would support a conclusion that mandamus relief was inappropriate as a matter of law.

B. Harper's Willingness to Comply Without Coercion

Harper contends that a writ should not have issued because he does not question his statutory obligation to obtain licenses for each of the CYA's correctional treatment centers. In demonstrating his willingness to comply with the licensing requirements, Harper outlines the steps CYA is taking toward licensing the correctional treatment centers at three of its eleven facilities. Arguing the writ that issued in this case is unnecessary, he relies on the well-settled proposition that "[i]f the respondent shows a willingness to perform without coercion, the writ may be denied as unnecessary; and if he shows actual compliance, the proceeding will be dismissed as moot." (8 Witkin, Cal. Procedure (4th ed. 1997) Extraordinary Writs, § 82, p. 869.)
Numerous cases illustrate the point Harper makes herethat the court will not issue an extraordinary writ of mandamus merely to enable a party to prove a point or to excoriate a public official for a mistake he stands ready to correct. (See, e.g., Cooke v. Superior Court (1989) 213 Cal.App.3d 401, 417, 261 Cal.Rptr. 706, disapproved on another point in County of San Diego v. State of California (1997) 15 Cal.4th 68, 106, fn. 30, 61 Cal.Rptr.2d 134, 931 P.2d 312 [county's resolution showed good faith willingness to perform and made issuance of writ inappropriate]; State Bd. of Education v. Honig (1993) 13 Cal.App.4th 720, 746-747, 16 Cal.Rptr.2d 727 [court refused to direct respondent to submit guidelines and reports where the evidence showed that the guidelines and reports had already been submitted or were not yet due]; Bruce v. Gregory (1967) 65 Cal.2d 666, 670-671, 56 Cal.Rptr. 265, 423 P.2d 193 [writ unnecessary where regulations submitted]; George v. Beaty (1927) 85 Cal.App. 525, 527-528, 260 P. 386 [writ unnecessary where respondents recited facts of performance, together with the allegation that "`they are now expressly and in every detail complying with the command set forth in the alternative writ of mandate'"].)
However, we believe there is a critical distinction between the cases where the writ was found to be unnecessary and the situation before us. Obviously, if Harper had substantially complied with the legally mandated licensing requirement for the correctional treatment centers before the writ issued, no one could claim that the *67 issuance of the writ was necessary. By contrast, the case before us presents a situation where Harper has acknowledged that he has a duty to obtain licenses for the CYA's correctional treatment centers, but he has failed to take the necessary steps to comply with the law for a protracted period of time.
The principles guiding the issuance of writs of mandamus are broad enough to encompass compelling performance in such a situation. After all, "`"[i]t is the refusal or neglect to perform an act which is enjoined by the law as a present duty that serves as the very foundation for the [mandamus] proceeding." [Citation.]' [Citation.]" Morris v. Noguchi (1983) 141 Cal. App.3d 520, 523, 190 Cal.Rptr. 347, italics added.) At oral argument, counsel were asked for their respective explanations as to why, after 14 years following enactment of the licensing requirement, seven years since licensing has been required by statute, and more than a year since the order of the trial court, CYA has yet failed to license even one of the 11 inpatient medical facilities falling within section 1250. In reply, counsel for CYA exhorted this panel that, even now the agency was moving forward with licensure in good faith, albeit at a "glacier-like" pace.
We cannot agree that this level of inaction can be characterized as a good faith effort to comply with the law. Indeed, the lack of any justifiable reason for the protracted delay is, at best, gross indifference to, if not outright defiance of, the mandates of the Legislature and the judiciary. That this apparent intransigence comes at the expense of the health of at-risk juvenile wards of this state is appalling. We trust that our displeasure at this state of affairs at CYA will be communicated to those in whom this important public trust is reposed.
Therefore, we conclude the trial court correctly viewed this action as one in which Harper did not intend to comply with his lawful obligation without the coercion provided by the issuance of the writ. The words of the court in California Trout, Inc. v. Superior Court (1990) 218 Cal.App.3d 187, 266 Cal.Rptr. 788 are applicable here. "An administrative agency has no discretion to engage in unjustified, unreasonable delay in the implementation of statutory commands .... [and a] court cannot ignore the ongoing violation of a statutory mandate on the ground that the violation will eventually be halted by untimely administrative action." (Id. at p. 203, 266 Cal.Rptr. 788.)

C. Approval of Third Parties

Harper represents that he is unable to bring the CYA's correctional treatment centers into compliance with the Health and Safety Code without the approval and cooperation of third parties. He invokes another well-settled proposition that a writ of mandamus will not issue unless the respondent has the present ability or legal authority to perform the alleged duty. (Romo v. Department of Motor Vehicles (1991) 229 Cal.App.3d 251, 254, 280 Cal. Rptr. 33.) Accordingly, he contends the writ was improperly issued because "his ability to obtain licenses is, in large measure, dependent upon the action, cooperation, and approval of, among others, the Department of Finance and the Legislature."
This argument simply ignores the realities of the situation. As Morris points out, if we were to accept this argument, no public agency could be held to the requirements of state law. Numerous cases illustrate that financial distress and dependence on third parties to provide funding for legally mandated services does not constitute a sufficient basis for denying a writ *68 of mandamus. (See, e.g., Harbach v. El Pueblo de Los Angeles etc. Com. (1971) 14 Cal.App.3d 828, 836, 92 Cal.Rptr. 757 [court granted a writ to compel the respondent commission to implement a resolution even though it required funding approval from the State Director of Finance]; City and County of San Francisco v. Superior Court (1976) 57 Cal.App.3d 44, 47-49, 128 Cal.Rptr. 712; Bellino v. Superior Court (1977) 70 Cal.App.3d 824, 831, 137 Cal.Rptr. 523; Corenevsky v. Superior Court (1984) 36 Cal.3d 307, 313, 204 Cal. Rptr. 165, 682 P.2d 360; Orange County Employees Assn. v. County of Orange (1991) 234 Cal.App.3d 833, 844, fn. 10, 285 Cal.Rptr. 799, ["`arguments regarding financial costs incident to the granting of judicial relief, where such relief is compelled by law, are properly addressed to the Legislature, not to the courts'"].)
In issuing a writ of mandate, the trial court compelled Harper to fulfill his legal duty by taking the necessary steps to comply with the licensing requirements for correctional treatment centers. As the above-cited authorities illustrate, obtaining relief by means of mandate was appropriate even though Harper will need the approval and cooperation of third parties to comply with the court's directive.

D. Control of Administrative Agency Discretion

Harper next argues the court's judgment in this case is an impermissible attempt to "control Harper's discretion over the manner by which he provides medical and mental health care services to wards in the CYA's custody." (Original italics.) As this argument was stated by Harper below, "[a] close reading of the relevant statutes and regulations reveals that the CYA is not required to provide inpatient health services to those wards who do not require a general acute care level of basic services through the operation of [correctional treatment centers].... Rather, while the CYA may indeed choose to provide these health services through licensed [correctional treatment centers], it may also choose to provide them in a variety of other ways, i.e., by contracting with private hospitals and other health care providers .... Recognizing that the CYA retains discretion over the manner by which it provides health care services to its wards is, for purposes of this proceeding, essential to understanding why mandate may not issue in this case."
It is true, as Harper emphasizes, that mandamus will not lie to control an exercise of discretion, i.e., to compel an official to exercise discretion in a particular manner. (Orange County Employees Assn. v. County of Orange, supra, 234 Cal.App.3d at p. 845, 285 Cal.Rptr. 799.) Generally, mandamus may only be employed to compel the performance of a duty that is purely ministerial in character. (Rodriguez, supra, 1 Cal.App.4th at p. 501, 2 Cal.Rptr.2d 50.)
A ministerial act has been described as "an act that a public officer is required to perform in a prescribed manner in obedience to the mandate of legal authority and without regard to his [or her] own judgment or opinion concerning such act's propriety or impropriety, when a given set of facts exists." (Rodriguez, supra, 1 Cal.App.4th at p. 501, 2 Cal. Rptr.2d 50.) On the other hand, discretion is the power conferred on public functionaries to act officially according to the dictates of their own judgment. (Id. at pp. 501-502, 2 Cal.Rptr.2d 50; Transdyn/Cresci JV v. City and County of San Francisco (1999) 72 Cal.App.4th 746, 752, 85 Cal. Rptr.2d 512.)
However, between the definitions of ministerial and discretionary acts *69 lies the following pertinent rule: A refusal to exercise discretion is itself an abuse of discretion. Accordingly, although mandamus is not available to compel the exercise of the discretion in a particular manner or to reach a particular result, it does lie to command the exercise of discretionto compel some action upon the subject involved under a proper interpretation of the applicable law. (See Sunset Drive Corp. v. City of Redlands (1999) 73 Cal.App.4th 215, 222, 86 Cal.Rptr.2d 209; Covarrubias v. Superior Court (1998) 60 Cal.App.4th 1168, 1182, 71 Cal.Rptr.2d 91.) "Where a statute requires an officer to do a prescribed act upon a prescribed contingency, his functions are ministerial. Where a statute or ordinance clearly defines the specific duties or course of conduct that a governing body must take, that course of conduct becomes mandatory and eliminates any element of discretion. [Citation.]" (Rodriguez, supra, 1 Cal.App.4th at pp. 504-505, 2 Cal.Rptr.2d 50.)
Harper's claim that the writ improperly interfered with the CYA's discretion to decide the manner by which it provides health services to its wards, ignores the wording of the writ. The trial court ordered Harper to "[d]evelop a written plan to implement the [Health and Safety Code] statutory mandates by February 2, 2001, or alternatively, develop a written plan for servicing the inmate population if licensing will not be pursued." (Italics added.) If Harper exercises his discretion by continuing to operate correctional treatment centers, the duty to come into compliance with the applicable state licensing laws becomes ministerial. (See, e.g., Terminal Plaza Corp. v. City and County of San Francisco (1986) 186 Cal.App.3d 814, 834, 230 Cal.Rptr. 875 [while zoning administrator may have discretion to "choose among various enforcement mechanisms" in carrying out the intent of the planning code, he did not have the power to countermand a particular condition adopted by the planning commission and approved by the board of permit appeals or to refuse to enforce that condition].) Harper does not have the discretion to operate unlicensed health facilities.

Disposition
The judgment is affirmed. Costs to respondent.
We concur: KLINE, P.J. and HAERLE, J.
NOTES
[1]  All undesignated statutory references are to the Health and Safety Code.
[2]  Section 1250, subdivision (j)(1) defines "correctional treatment center" as "[A] health facility operated by the Department of Corrections, the Department of the Youth Authority, or a county, city or city and county law enforcement agency that, as determined by the state department [of Health Services], provides inpatient health services to that portion of the inmate population who do not require a general acute care level of basic services."
[3]  The three facilities are: (1) the Herman G. Stark Youth Correctional Facility, (2) the Ventura Youth Correctional Facility, and (3) the Northern California Youth Correctional Center.
