*107California law provides that the death penalty shall be inflicted by either lethal gas or by "an intravenous injection of a substance or substances in a lethal quantity sufficient to cause death, by standards established under the direction of the Department of Corrections and Rehabilitation." ( Pen. Code, § 3604, subd. (a).)1 The question in this case is whether that statute impermissibly delegates the Legislature's authority to non-elected agency officials. We *108conclude the trial court properly sustained defendant's demurrer on the ground that section 3604 does not violate the doctrine of separation of powers. *303I. BACKGROUND
Mitchell Sims and Michael Morales, who have been sentenced to death, and the American Civil Liberties Union of Northern California (collectively, plaintiffs) brought this petition for writ of mandate and complaint for declaratory and injunctive relief under the California Constitution against Scott Kernan, as Secretary of the California Department of Corrections and Rehabilitation (CDCR, or the Department) and the Department (collectively, defendants), alleging that section 3604 violates the separation of powers provision of the California Constitution ( Cal. Const., art. III, § 3 ) because it leaves to the Department "fundamental policy questions" regarding "the pain, speed, reliability, and secrecy of the execution process."
The petition alleges that the death penalty and the manner in which it is carried out is a matter of intense public interest. A number of botched executions across the country have shown that choices in the design of the execution protocol-such as the choice of drugs, their combination, their source, or the number of attempts that could be made to gain access to a vein-could affect the risk and level of pain during an execution, the speed with which death occurs, and the reliability of the execution. And, according to the petition, there may be trade-offs among those choices: Decisions to minimize pain may increase the duration of an execution or decrease its reliability. Moreover, choices made in designing the execution process reflect judgments about the level of secrecy considered acceptable. The petition alleges section 3604"delegates to CDCR unbridled discretion to develop protocols for executing inmates by lethal injection and lethal gas, and absolves the Legislature of its constitutional duty to address fundamental policy questions and provide guidance to CDCR in implementing the death penalty," and that it "does not address the pain, speed, reliability, or transparency considered acceptable or desirable in an execution protocol, or provide CDCR with any guidance on how to resolve the policy priorities to the extent they conflict."
The petition also alleges that in the past, CDCR's execution protocols consistently elevated administrative convenience over transparency or the risk of pain, and that courts have struck down those protocols in whole or in part five times. CDCR's current protocol, petitioners allege, shows a priority for administrative convenience over other policy goals and reflects "inconsistent, ambiguous, and conflicting choices on fundamental policy issues involving pain, speed, reliability, and transparency." For instance, the Department *109adopted a one-drug protocol to reduce pain, but included no protocols regarding establishing intravenous access. The protocol allows the warden of San Quentin State Prison to select among four drugs, but the drugs act at different speeds, and two of the drugs were of uncertain reliability because they had never before been used in an execution. The protocol does not require testing of drugs and contemplates procuring them from a compounding pharmacy, which increases the risk that the drugs might be contaminated or otherwise defective, and it does not allow witnesses to view the preparation of the drugs before an execution. The petition also alleges the Department lacks administrative expertise in carrying out executions: the protocol wrongly refers to certain drugs as opioids and uses a term that is not a recognized medical term.
Petitioners seek a declaration that section 3604 violates the separation of powers clause of the California Constitution and that any protocols issued under it are invalid, and a writ of mandate and injunction prohibiting defendant from developing, issuing, *304or implementing an execution protocol under the current statute.
Defendants demurred to the petition on the grounds that it was barred by res judicata because Sims and Morales had previously challenged the Department's actions in developing or implementing execution standards; that writ relief was inappropriate because the Department had a duty under section 3604 to develop a protocol for lethal injection; that there was no improper delegation of legislative authority; and that there was no cause of action under a theory of taxpayer standing ( Code Civ. Proc., § 526a ). The trial court sustained the demurrer without leave to amend on the sole ground that section 3604 is not an unconstitutional delegation of the legislative responsibility to make fundamental policy decisions.
II. DISCUSSION
Plaintiffs contend section 3604 violates the principle of separation of powers because it delegates fundamental policy decisions to the CDCR and because the Legislature did not provide sufficient safeguards and guidance. Section 3604, subdivision (a) provides: "The punishment of death shall be inflicted by the administration of a lethal gas or by an intravenous injection of a substance or substances in a lethal quantity sufficient to cause death, by standards established under the direction of the Department of Corrections and Rehabilitation." Condemned persons may elect to be executed by either lethal gas or lethal injection, and if the person does not make a choice, lethal injection will be used. ( § 3604, subd. (b).)
Our standard of review is well settled. " 'When reviewing an order sustaining a demurrer without leave to amend, this court must treat the *110demurrer as admitting all properly pleaded facts, but not contentions, deductions or conclusions of fact or law. We must read the complaint as a whole and give it a reasonable interpretation.' [Citation.] 'Regardless of the label attached to a cause of action, we must examine the complaint's factual allegations to determine whether they state a cause of action on any available legal theory. Reversible error is committed if the facts show entitlement to relief under any possible legal theory.' " ( Dunkin v. Boskey (2000) 82 Cal.App.4th 171, 180, 98 Cal.Rptr.2d 44.) We review the trial court's decision de novo. ( Nicholson v. Fazeli (2003) 113 Cal.App.4th 1091, 1100, 6 Cal.Rptr.3d 881.) We affirm the trial court's decision to sustain the demurrer if it is correct on any theory. ( Berg & Berg Enterprises, LLC v. Boyle (2009) 178 Cal.App.4th 1020, 1034, 100 Cal.Rptr.3d 875.)
" '[A]lthough it is charged with the formulation of policy,' the Legislature 'properly may delegate some quasi-legislative or rulemaking authority.' [Citation.] 'For the most part, delegation of quasi-legislative authority ... is not considered an unconstitutional abdication of legislative power.' [Citation.] 'The doctrine prohibiting delegations of legislative power does not invalidate reasonable grants of power to an administrative agency, when suitable safeguards are established to guide the power's use and to protect against misuse.' [Citation.] Accordingly, '[a]n unconstitutional delegation of authority occurs only when a legislative body (1) leaves the resolution of fundamental policy issues to others or (2) fails to provide adequate direction for the implementation of that policy.' " ( Gerawan Farming, Inc. v. Agricultural Labor Relations Bd. (2017) 3 Cal.5th 1118, 1146-1147, 225 Cal.Rptr.3d 517, 405 P.3d 1087.) "Only in the event of a total abdication of that power, through failure either to render basic policy decisions or to assure that they are implemented as made, will this court intrude on *305legislative enactment because it is an 'unlawful delegation.' " ( Kugler v. Yocum (1968) 69 Cal.2d 371, 384, 71 Cal.Rptr. 687, 445 P.2d 303.)
This case hinges on the meaning of "fundamental policy issues." Plaintiffs argue the Legislature delegated to the Department several fundamental policy issues that the Legislature itself should have decided regarding execution by lethal injection: "To what extent should an execution protocol seek to cause death painlessly, effectuate a swift execution, ensure a reliable process, or minimize secrecy?" The Department, on the other hand, contends that the Legislature did decide the fundamental policy issues when it established the death penalty, set the crimes for which the death penalty should be imposed (§ 190.2) and selected lethal gas or lethal injection as the methods of execution, and that it could properly leave to the Department the protocol for carrying out those methods of execution.
A review of the case law persuades us that the Department has the better of the argument. In *111Clean Air Constituency v. California State Air Resources Bd. (1974) 11 Cal.3d 801, 817, 114 Cal.Rptr. 577, 523 P.2d 617 ( Clean Air Constituency ), the court considered whether the State Air Resources Board (ARB) had exceeded its authority under a law that required it to set standards for devices that would reduce the emissions of oxides of nitrogen (NOx) from vehicles, and permitted it to delay for " 'extraordinary and compelling reasons only' " a requirement that vehicles comply with the law. ( Id . p. 806, 114 Cal.Rptr. 577, 523 P.2d 617.) The ARB delayed the program in 1973, on the ground that the energy crisis presented an extraordinary and compelling reason for delay. ( Id . at p. 807, 114 Cal.Rptr. 577, 523 P.2d 617.) Our high court concluded this action exceeded the ARB's authority because the postponement did not effectuate and was not consistent with the goals of the statute. ( Id . at p. 816, 114 Cal.Rptr. 577, 523 P.2d 617.) The court went on to conclude that if the Legislature had not confined the scope of the ARB's authority to "extraordinary and compelling reasons relating to the purposes and goals of the Air Resources Act," then it would have unconstitutionally delegated its powers because it would have permitted the ARB to make legislative decisions. ( Id . at pp. 816-817, 114 Cal.Rptr. 577, 523 P.2d 617.) The Legislature had "concluded as a matter of fundamental policy that urgent action against automobile pollution was essential for the health of California's residents," in effect making "clean air a higher priority than the concern for fuel consumption, the problem of rising costs in transportation, or the economics of the automobile industry.... [T]he ARB determined that urgent action against the energy crisis was essential for the economic well-being of the state," thus inverting the Legislature's own fundamental policy determination. ( Id . at p. 817, 114 Cal.Rptr. 577, 523 P.2d 617.) Any delays must be justified by reference to the goals of the legislation. ( Id . at pp. 818-819, 114 Cal.Rptr. 577, 523 P.2d 617.) Here, on the other hand, the Department was asked to make no decisions contrary to the Legislature's determinations regarding the manner of the death penalty. Rather, it was asked to implement the Legislature's policy determination to use lethal gas or lethal injection as methods of execution.
Our high court again considered delegation of powers in Agricultural Labor Relations Bd. v. Superior Court (1976) 16 Cal.3d 392, 419, 128 Cal.Rptr. 183, 546 P.2d 687 ( ALRB ). The Legislature had enacted the Agricultural Labor Relations Act ( Lab. Code, § 1140 et seq. ) declaring the right of agricultural employees to form unions and engage in collective bargaining.
*306( ALRB , 16 Cal.3d at p. 398, 128 Cal.Rptr. 183, 546 P.2d 687.) The Agricultural Relations Board was vested with power to prevent any person from engaging in unfair labor practices, and to make rules and regulations that are necessary to carry out the provisions of the act. ( Id . at pp. 399-400, 128 Cal.Rptr. 183, 546 P.2d 687.) One regulation the board adopted granted to farm labor organizers a "qualified right of access" to growers' premises. ( Id . at p. 400, 128 Cal.Rptr. 183, 546 P.2d 687.) The court concluded the regulation did not violate Clean Air Constituency 's rule against unconstitutional delegations of power: the Legislature made the " 'fundamental policy determination' "
*112when it decided to grant farm workers the rights to self-organization and collective bargaining. "Seen in the perspective of that momentous decision, the board's qualified access provision appears much less important than the real parties would have us believe. As a regulation which in essence merely implements one aspect of the statutory program-the holding of secret elections-it does not amount to a 'fundamental policy determination' within the meaning of the quoted rule." ( Id . at p. 419, 128 Cal.Rptr. 183, 546 P.2d 687.)
The same can be said here. The Legislature has made the "momentous decision" to establish the death penalty and has decided the methods by which it will be carried out. The Legislature could properly delegate to the Department responsibility to establish procedures for implementing it.
Plaintiffs contend that Clean Air Constituency prevents the Legislature from delegating policy decisions that it had the "time, information and competence" to decide, and that questions about pain, speed, reliability, and transparency in the execution process fall into this category. ( Clean Air Constituency , supra , 11 Cal.3d at p. 817, 114 Cal.Rptr. 577, 523 P.2d 617.) We are unpersuaded. Our high court there stated that underlying the rules regarding delegation of power "is the belief that the Legislature as the most representative organ of government should settle insofar as possible controverted issues of policy and that it must determine crucial issues whenever it has the time, information and competence to deal with them." ( Clean Air Constituency , supra , 11 Cal.3d at p. 817, 114 Cal.Rptr. 577, 523 P.2d 617.) But after making the quoted statement, the court went on to conclude that allowing the ARB to delay implementation of the NOx program for "extraordinary and compelling reasons" was an acceptable delegation as long as ARB's discretion was "limited to reasons which relate to the purposes and goals of the Air Resources Act." ( Ibid . ) Thus, the Legislature could delegate authority to make policy decisions that implemented the goals of the statute, but it could not delegate authority to make the sort of "fundamental ... policy determination the Legislature had made when it enacted the program in the first instance." ( Ibid . ) Here, the Legislature has made the fundamental, crucial policy decisions to impose the penalty of death in specified circumstances and to have the penalty imposed through lethal gas or lethal injection. Clean Air Constituency does not prevent the Legislature from delegating authority to make subsidiary decisions to carry out that policy.
This is true even if the subsidiary decisions involve controverted policies, as these surely do. Salmon Trollers Marketing Assn. v. Fullerton (1981) 124 Cal.App.3d 291, 302, 177 Cal.Rptr. 362 ( Salmon Trollers ) considered the Legislature's delegation to the Department of Fish and Game of authority to formulate fishery management plans and adopt regulations in order to conform state law to a federal fishery management plan. ( *307Id . at p. 296 & fn. 2, 177 Cal.Rptr. 362.) The director of the department filed emergency regulations closing the salmon season in response *113to a drought, consistent with federal action. ( Id . at pp. 295, 297-298, 177 Cal.Rptr. 362.) The appellate court rejected a challenge by a fishing industry group that the Legislature had unconstitutionally delegated its authority to the department. It first noted that a legislative act is presumed to be constitutional, doubts will be resolved in favor of its validity, and "delegation by the Legislature is viewed as a positive and beneficial way to implement legislation." ( Id . at pp. 299-300, 177 Cal.Rptr. 362.) The court went on to conclude that the Legislature had made the "basic policy determination" to support the federal fishery management plan, and to avoid conflict with the federal fishery plan when managing its own fisheries. ( Id . at p. 300, 177 Cal.Rptr. 362.) Having made these "fundamental policy determinations," the Legislature could delegate to the director the task of formulating fishery plans, a task that required "expertise, biological data collection and evaluation, and consultation with the commercial fishing industry." ( Id . at pp. 300-301, 177 Cal.Rptr. 362.)
The petition on its face suggests reasons the Legislature could have deemed it appropriate to delegate to the Department authority to make decisions affecting pain, speed, and reliability in carrying out the death penalty: it may be difficult to obtain certain drugs from manufacturers, and the CDCR's regulations allow the warden of San Quentin State Prison discretion to choose from alternative chemical options because of the " 'shifting availability of chemicals.' " (See Glossip v. Gross (2015) --- U.S. ----, 135 S.Ct. 2726, 2733-2735, 192 L.Ed.2d 761 [states have been forced to alter execution protocols when manufacturers refused to supply certain drugs].) The petition also contains vivid descriptions of botched executions around the country; the Legislature could conclude the Department was in the best position to apply any lessons learned from other executions in developing appropriate protocols.
This conclusion is bolstered by the fact that the Legislature made multiple other policy decisions regarding imposition and execution of the death penalty. Those include requiring separate phases of trial for death penalty cases (§ 190.1); establishing procedures for cases alleging special circumstances (§ 190.4); setting out factors to consider in determining whether the penalty in such cases should be death or life without parole (§ 190.3); establishing the place of imprisonment and execution of inmates sentenced to death (§§ 3600, 3601, 3602, 3603); allowing the inmate to make a new choice between lethal gas and lethal injection if the execution does not take place on the scheduled date ( § 3604, subd. (c) ); enumerating the witnesses who may be present at the execution, including the Attorney General, members of the family of the victim, 12 reputable citizens selected by the warden, and, at the inmate's request, two ministers, up to five relatives or *114friends of the inmate, and peace officers (§ 3605, subds. (a) & (b) ); and providing that any physician's attendance must be voluntary (§ 3605, subd. (c) ). Unlike the development of protocols for lethal injection, none of these policy decisions depend on the availability of particular drugs to implement the death penalty. Under the circumstances, the Legislature could properly delegate to the Department responsibility for developing an execution protocol.
Plaintiffs argue that the Legislature failed to provide standards and safeguards to guide the Department in exercising its delegated authority. Again, we disagree. Plaintiffs are correct that, in delegating authority, the Legislature must *308provide "adequate direction for the implementation of [its] policy." ( Carson Mobilehome Park Owners' Assn v. City of Carson (1983) 35 Cal.3d 184, 190, 197 Cal.Rptr. 284, 672 P.2d 1297 ( Carson ).) However, "standards for administrative application of a statute need not be expressly set forth; they may be implied by the statutory purpose." ( People v. Wright (1982) 30 Cal.3d 705, 713, 180 Cal.Rptr. 196, 639 P.2d 267, citing Birkenfeld v. City of Berkeley (1976) 17 Cal.3d 129, 168, 130 Cal.Rptr. 465, 550 P.2d 1001 ; see also Carson , at p. 190, 197 Cal.Rptr. 284, 672 P.2d 1297.)
Section 3604 originally established the administration of lethal gas as the method of execution in California. (Stats. 1941, ch. 106, § 15, p. 1117.) It was amended in 1992 to provide for lethal injection as an alternate method, leaving lethal gas as the default if the inmate did not make an election between the two methods. (Stats. 1992, ch. 558, § 2, p. 2075.) In 1996, in response to a Ninth Circuit Court of Appeal ruling that execution by lethal gas constituted cruel and unusual punishment in violation of the Eighth Amendment to the United States Constitution ( Fierro v. Gomez (9th Cir. 1996) 77 F.3d 301, vacated in light of amended § 3604, Gomez v. Fierro, supra, 519 U.S. 918, 117 S.Ct. 285 ), the Legislature again amended section 3604 and made lethal injection the default method of execution. (Stats. 1996, ch. 84, § 1, p. 397.) The legislative history, of which we take judicial notice, makes clear that the purpose of the 1996 amendment was to bring the law into conformity with federal constitutional requirements in light of Fierro v. Gomez . (Sen. Rules Com., Off. of Sen. Floor Analyses, 3d reading analysis of A.B. 2082 (1995-1996 Reg. Sess.) as introduced; Assem. Com. of Public Safety, March 12, 1996 analysis of A.B. 2082 (1995-1996 Reg. Sess.) as introduced.)
This purpose gives the Department adequate guidance. "The Eighth Amendment prohibits governmental imposition of 'cruel and unusual punishments,' U.S. Const. amend. VIII, and bars 'infliction of unnecessary pain in the execution of the death sentence.' [citation]. 'Punishments are deemed cruel when they involve torture or a lingering death ....' " ( *115Fierro v. Gomez , supra , 77 F.3d at p. 306 ; see Glossip v. Gross , supra , 135 S.Ct. at p. 2740 [inmate challenging lethal injection protocol must show "substantial risk of severe pain"].) In developing a protocol for lethal injections, the Department must meet these standards: it may not inflict unnecessary pain and it must seek to avoid a lingering death. The Legislature did not need to provide more explicit standards and safeguards.
Our conclusion is in line with those of almost all other states that have considered a similar delegation of authority. Plaintiffs draw our attention to the Arkansas case of Hobbs v. Jones (2012) 2012 Ark. 293, 412 S.W.3d 844, 852-855, which held that a statute that delegated to the director of the Department of Correction the choice of chemicals and the policies and procedures to be used in lethal injection violated the doctrine of separation of powers because it did not give reasonable guidelines for the exercise of that discretion. However, Hobbs v. Jones has been described as an "outlier" (Zink v. Lombardi (W.D. Mo. 2012) 2012 U.S. Dist. LEXIS 191818, *29-30), and multiple other courts have found similar provisions satisfied constitutional standards. (See id ., at *32-33 [Missouri legislature established general policy to conduct execution by lethal gas or injection and agency could reasonably fill in details regarding protocol and method of execution as drugs become less available or new drugs enter market];
*309Cook v. State (App. 2012) 230 Ariz. 185, 281 P.3d 1053, 1055-1056 [statute directing Department of Corrections to supervise infliction of death penalty by injection with lethal substances provides definite policy and rule of action to guide department; Eighth Amendment also guides and limits department's discretion]; State v. Ellis (2011) 281 Neb. 571, 799 N.W.2d 267, 289 ["by specifying the purpose of the statute, the punishment to be imposed, and generally identifying the means, a legislature has declared a policy and fixed a primary standard, permitting delegation of details that the legislature cannot practically or efficiently perform itself."]; accord, Sims v. State (Fla. 2000) 754 So.2d 657, 668-670 ; State v. Osborn (1981) 102 Idaho 405, 631 P.2d 187, 201 ; Ex Parte Granviel (Tex. Crim. App. 1978) 561 S.W.2d 503, 514-515.) Here too, we conclude the delegation of authority does not violate the doctrine of separation of powers.
The trial court properly sustained the demurrer without leave to amend on the ground plaintiffs have not alleged an improper delegation of authority to the Department. Because we reach the same conclusion, we need not reach the Department's alternate contention that the action is barred by principles of res judicata.
*116III. DISPOSITION
The judgment is affirmed.
We concur:
Pollak, P.J.
Lee, J.*
All undesignated statutory references are to the Penal Code.
Judge of the Superior Court of California, City and County of San Mateo, assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.