
9 Cal.Rptr.3d 745 (2004)
115 Cal.App.4th 995
The PEOPLE, Petitioner,
v.
The SUPERIOR COURT of San Luis Obispo County, Respondent;
Breanna Nicole ORTIZ, Real Party in Interest.
No. B170471.
Court of Appeal, Second District, Division Six.
February 17, 2004.
Rehearing Denied March 17, 2004.
*746 Gerald T. Shea, District Attorney, and Curtis A. Rankin, Deputy District Attorney, for Petitioner.
No appearance for Respondent.
Patricia Nemec Ashbaugh, San Luis Obispo, for Real Party in Interest.
PERREN, J.
It is a felony for any person to possess a controlled substance in or within the grounds of certain state institutions. (Pen.Code,[1] § 4573.6.) Here we hold that the broad sweep of section 4573.6 includes state mental hospitals in which inmates, who have been transferred there for treatment pursuant to section 2684, are involuntarily confined under the custody of peace officers.
An employee of Atascadero State Hospital (ASH) was charged with a violation of section 4573.6 after methamphetamine allegedly was found in her purse while she was on hospital grounds. The charge was premised on the fact that ASH houses mentally ill inmates who have been transferred there for treatment pursuant to section 2684. The trial court granted defendant's section 995 motion to dismiss the charge on its finding that section 2684 patients are not located under the custody of prison officials while they are being treated at ASH. The court also rejected the People's contention that section 2684 patients are held under the custody of peace officers while undergoing treatment at ASH.
The People petitioned for a writ of mandate directing the trial court to vacate its order granting the section 995 motion. Because the trial court erred in concluding that section 2684 patients housed at ASH are not held under the custody of peace officers as contemplated by section 4573.6, we shall grant the writ.

FACTS AND PROCEDURAL HISTORY
ASH is one of four hospitals in this state under the jurisdiction of the Department of Mental Health that were established for the care, treatment and education of mentally disordered individuals. (Welf. & Inst. *747 Code, §§ 4100, 7200.) Pursuant to section 2684, inmates confined in state prisons may be transferred to ASH for care and treatment. Approximately 125 such inmates are housed at ASH at any given time. Signs conspicuously posted at ASH provide notice that it is illegal to possess controlled substances within the hospital or on its grounds.
On the afternoon of February 9, 2003, an ASH police officer discovered two small bindles of methamphetamine in the purse of employee Breanna Nicole Ortiz during a search on hospital grounds. Ortiz was subsequently charged by complaint with violations of section 4573.6 (possession of a controlled substance in a place where inmates are located) and Health and Safety Code section 11378 (possession of methamphetamine for sale).
At the conclusion of the preliminary hearing, the magistrate dismissed the section 4573.6 count on its finding that ASH is not a facility contemplated by the statute. The People subsequently filed an information reiterating the section 4573.6 charge. Ortiz moved to dismiss the charge pursuant to section 995, and the trial court granted the motion. The court rejected the People's claim that section 2684 inmates remain under the custody of the Department of Corrections while they are housed at ASH. The court further reasoned that an inmate who is transferred to ASH for treatment pursuant to section 2684 "comes into their custody, not the custody of police officers who may be working for the hospital, but custody of the hospital."
The People timely sought writ relief from the trial court's ruling, and we issued an order to show cause why such relief should not be granted. Proceedings were stayed pending our decision on the petition.

DISCUSSION

I.
Section 4573.6 provides in its entirety: "Any person who knowingly has in his or her possession in any state prison, prison road camp, prison forestry camp, or other prison camp or prison farm or any place where prisoners of the state are located under the custody of prison officials, officers, or employees, or in any county, city and county, or city jail, road camp, farm, or any place or institution, where prisoners or inmates are being held under the custody of any sheriff, chief of police, peace officer, probation officer, or employees, or within the grounds belonging to any jail, road camp, farm, place or institution, any controlled substances, the possession of which is prohibited by Division 10 (commencing with Section 11000) of the Health and Safety Code, any device, contrivance, instrument, or paraphernalia intended to be used for unlawfully injecting or consuming controlled substances, without being authorized to so possess the same by the rules of the Department of Corrections, rules of the prison or jail, institution, camp, farm or place, or by the specific authorization of the warden, superintendent, jailer, or other person in charge of the prison, jail, institution, camp, farm or place, is guilty of a felony punishable by imprisonment in the state prison for two, three, or four years. [¶] The prohibitions and sanctions addressed in this section shall be clearly and prominently posted outside of, and at the entrance to, the grounds of all detention facilities under the jurisdiction of, or operated by, the state or any city, county, or city and county."
In granting Ortiz's section 995 motion to dismiss the charge brought against her under section 4573.6, the trial court concluded that section 2684 inmates are not in prison, located under the custody of prison *748 officials, or held under the custody of peace officers while they are housed at ASH.
Where, as here, the issue to be decided is purely one of statutory construction, the question is one of law subject to our de novo review. (See, e.g., City of Long Beach v. California Citizens for Neighborhood Empowerment (2003) 111 Cal.App.4th 302, 305, 3 Cal.Rptr.3d 473.) In construing a statute, we apply settled rules of statutory construction: "`When construing a statute, we must "ascertain the intent of the Legislature so as to effectuate the purpose of the law."' [Citations.] `[W]e begin with the words of a statute and give these words their ordinary meaning.'... `If the statutory language is clear and unambiguous, then we need go no further.'... If, however, the language supports more than one reasonable construction, we may consider `a variety of extrinsic aids, including the ostensible objects to be achieved, the evils to be remedied, the legislative history, public policy, contemporaneous administrative construction, and the statutory scheme of which the statute is a part.'... Using these extrinsic aids, we select the construction that comports most closely with the apparent intent of the Legislature, with a view to promoting rather than defeating the general purpose of the statute, and avoid an interpretation that would lead to absurd consequences.'" (People v. Sinohui (2002) 28 Cal.4th 205, 211-212, 120 Cal.Rptr.2d 783, 47 P.3d 629, citations omitted.)
As we shall explain, mentally ill inmates transferred to ASH pursuant to section 2684 are neither in prison nor located under the custody of prison officials. We also conclude, however, that the inmates are held at ASH under the custody of peace officers employed by the hospital. Accordingly, the section 4573.6 charge against Ortiz was properly brought.

II.
First, we decide whether ASH qualifies as a "state prison" or a "place where prisoners of the state are located under the custody of prison officials," as contemplated by section 4573.6. The People contend that section 6082 compels a finding that ASH qualifies as a prison in this context. That section provides that "[r]eferences ... in Title 5 (commencing with Section 4500) to prisons refer to all facilities, camps, hospitals and institutions for the confinement, treatment, employment, training and discipline of persons in the legal custody of the Department of Corrections."
The People's argument in this regard merely begs the question whether inmates who are transferred to ASH for treatment pursuant to section 2684 remain under the custody of the Department of Corrections. To determine the answer to this question, we must define the term "custody." For purposes relevant here, custody is defined as "The care and control of a thing or person.... Also the detainer of a man's person by virtue of lawful process or authority. [¶] The term is very elastic and may mean actual imprisonment or physical detention or mere power, legal or physical, of imprisoning or of taking manual possession...." (Black's Law Dict. (6th ed.1990) p. 384.) This definition demonstrates that the term "custody" can mean either actual physical custody or the legal right to care for and control an individual who may be located elsewhere.
The People concede that the Department of Corrections does not have actual physical custody of section 2684 inmates while they are housed at ASH. The People contend, however, that the Department of Corrections retains legal custody of the inmates. We disagree. Subdivision *749 (a) of section 2684 provides: "If, in the opinion of the Director of Corrections, the rehabilitation of any mentally ill, mentally deficient, or insane person confined in a state prison may be expedited by treatment at any one of the state hospitals under the jurisdiction of the State Department of Mental Health or the State Department of Developmental Services, the Director of Corrections ... shall certify that fact to the director of the appropriate department who shall evaluate the prisoner to determine if he or she would benefit from care and treatment in a state hospital. If the director of the appropriate department so determines, the superintendent of the hospital shall receive the prisoner and keep him or her until in the opinion of the superintendent the person has been treated to the extent that he or she will not benefit from further care and treatment in the state hospital." An inmate transferred to ASH pursuant to this section is returned to prison only if the hospital superintendent determines the inmate "has been treated to such an extent that such person will not benefit by further care and treatment in the state hospital...." (§ 2685.)
Accordingly, the Department of Corrections has no power to care for or control inmates after they are transferred to ASH pursuant to section 2684. Once the transfer has occurred, the superintendent of the hospital has the sole authority to determine whether the inmate should be returned to prison.
In arguing that section 2684 inmates remain under the custody of prison officials while they are housed at ASH, the People also rely on section 4504, subdivision (b) for the proposition that an inmate is deemed "confined in" prison while he or she is temporarily outside the walls of the prison for a legitimate purpose. Aside from the fact that section 4504, subdivision (b) defines confinement for the sole purpose of determining whether an inmate is guilty of committing a crime while in prison, section 2684 inmates who are transferred to ASH are not "temporarily outside the walls or bounds of the prison" as contemplated by the statute. (§ 4504, subd. (b).) Rather, inmates are transferred to ASH for treatment, and that transfer may be permanent. Moreover, the Department of Corrections has no power to control inmates after the transfer has occurred. It necessarily follows that section 2684 inmates being treated at ASH are not located "under the custody of prison officials" as contemplated by section 4573.6.

III.
Section 4573.6 also prohibits the possession of controlled substances in or within the grounds of "any place or institution, where prisoners or inmates are being held under the custody of any ... peace officer...." In granting Ortiz's section 995 motion to dismiss the section 4573.6 charge, the trial court rejected the People's contention that inmates housed at ASH pursuant to section 2684 are held under the custody of peace officers. Instead, the court concluded that the inmates are under the custody of ASH.
Although we do not disagree with the proposition that section 2684 inmates are under the custody of ASH, they are held under custody by peace officers within the facility. Notwithstanding the fact that ASH is under the jurisdiction of the Department of Mental Health, inmates transferred there for treatment pursuant to section 2684 are confined just as if they were in prison; it is the duty of law enforcement officers employed by the hospital to prevent them from leaving the premises. Officers of state hospitals under the jurisdiction of the Department of Mental Health are empowered to take such action, for *750 they "are peace officers whose authority extends to any place in the state for the purpose of performing their primary duty...." (§ 830.38.)[2]
In reaching a contrary conclusion, the trial court relied on dicta in In re Bennett (1969) 71 Cal.2d 117, 120, 77 Cal.Rptr. 457, 454 P.2d 33, to the effect that inmates are under the custody of ASH while they are being treated there. Aside from the fact that cases are not authority for propositions not considered (see Jones v. First American Title Ins. Co. (2003) 107 Cal.App.4th 381, 390, 131 Cal.Rptr.2d 859), we do not quarrel with the proposition that section 2684 inmates are located under the custody of ASH. Rather, we simply recognize that custody, as contemplated by section 4573.6, refers to the individuals within an institution who have the authority to prevent the inmates from leaving. At ASH, that authority lies with the hospital administrator (who also holds the power conferred on peace officers) and, by extension, the peace officers within the hospital's employ. (Welf.Inst.Code, 4313, 4493.)
Our conclusion that section 4573.6 applies to ASH is consistent with the statute's purpose to deter the presence of illicit drugs in custodial institutions. (Mathis v. Appellate Department (1972) 28 Cal.App.3d 1038, 1041, 105 Cal.Rptr. 126; People v. Waid (1954) 127 Cal.App.2d 614, 617, 274 P.2d 217.) The statute was deemed necessary to ensure orderly administration and security within such institutions. (People v. Clark (1966) 241 Cal.App.2d 775, 779-780, 51 Cal.Rptr. 7; Davis v. Superior Court (1959) 175 Cal.App.2d 8, 19-20, 345 P.2d 513.) Because ASH is a custodial institution with regard to the inmates who are transferred there pursuant to section 2684, and their movement within the facility is controlled by peace officers employed by the hospital, ASH qualifies as an institution where inmates are held under the custody of peace officers as contemplated by section 4573.6.

DISPOSITION
Let a peremptory writ of mandate issue directing the Superior Court of San Luis Obispo County to vacate its order granting Ortiz's section 995 motion dismissing count 1 of the information alleging a violation of section 4573.6, and to enter a new order denying the motion and reinstating the section 4573.6 count.
We concur: GILBERT, P.J., and COFFEE, J.
NOTES
[1]  All statutory references are to the Penal Code unless otherwise noted.
[2]  See also Welfare and Institutions Code sections 4313 and 4493 ["The hospital administrator of each state hospital may designate, in writing, as a police officer, one or more of the bona fide employees of the hospital. The hospital administrator and each such police officer have the powers and authority conferred by law upon peace officers listed in Section 830.38 of the Penal Code.... When and as directed by the hospital administrator, such police officers shall enforce the rules and regulations of the hospital, preserve peace and order on the premises thereof, and protect and preserve the property of the state."].
