
263 Cal.App.2d 272 (1968)
WASHINGTON TOWNSHIP HOSPITAL DISTRICT OF ALAMEDA COUNTY, Plaintiff and Respondent,
v.
COUNTY OF ALAMEDA et al., Defendants and Respondents; CITY OF FREMONT, Defendant and Appellant.
Civ. No. 24464. 
California Court of Appeals. First Dist., Div. Two.  
June 19, 1968.
 Raymond E. Ott, City Attorney, and Allen E. Sprague, Assistant City Attorney, for Defendant and Appellant.
 Quaresma, Sabraw & Avera and H. Robert Hall for Plaintiff and Respondent.
 Richard J. Moore, County Counsel, and Benjamin H. Zuppan, Deputy County Counsel, for Defendants and Respondents.
 SHOEMAKER, P. J.
 Defendant City of Fremont appeals from a judgment holding it liable for the cost of certain medical services furnished to an individual who had been arrested by a Fremont police officer on a homicide charge but who had not yet been arraigned on said charge.
 The facts are without conflict: on July 24, 1962, Macario Cero was arrested by a Fremont police officer at the scene of an apparent criminal homicide in the City of Fremont, County of Alameda. It appeared to the arresting officer that Cero was in immediate need of medical attention, so the officer sent him to the nearest hospital, the Washington Township Hospital, by means of a private ambulance service with which the city had contracted. Although two county hospitals were located some distance from the site of Cero's apprehension, the arresting officer reasonably believed that Cero's condition required the nearest possible medical aid. Upon arriving at the Washington Township Hospital, Cero was furnished with hospital and medical services valued at $459.60, rendered over a period of four days, and during that time Cero was under guard by the Fremont Police Department. On July 26, 1962, he was arraigned before a committing magistrate on the charge of murder. On July 28, 1962, he was transferred from Washington Township Hospital to an Alameda County hospital by the Sheriff of Alameda County.
 On April 21, 1966, plaintiff Washington Township Hospital District commenced the instant action for declaratory relief against defendants County of Alameda  [fn. 1] and City of Fremont. The complaint alleged the existence of an actual controversy between the parties in that plaintiff contended that defendant county was liable for the costs of the medical services rendered *275 Cero and further contended that to the extent it was not so liable, defendant city was liable.plaintiff further alleged that defendant county had denied liability on the ground that the services were not furnished at its request and defendant city denied liability on the ground that Cero had been charged with a violation of a state law and was thus the responsibility of defendant county.
 Defendant county took the position that it was liable for the cost of the medical services rendered Cero after he was arraigned but that it was not liable for the expenses incurred prior to his arraignment.
 Defendant city asserted that defendant county was liable, under section 29602 of the Government Code, for all medical expenses incurred in the treatment of Cero.
 The trial court made findings in accord with the above factual summary and further found that defendant county was obligated to plaintiff for the cost of Cero's post-arraignment care in the sum of $218.80; that defendant city had expressly requested the medical services furnished Cero and that under sections 4011 and 4011.5 of the Penal Code it was obligated to plaintiff in the sum of $240.80.
 Judgment was entered accordingly.
 [1] It has long been settled that liability for the cost of maintaining a prisoner in a county jail is dependent upon the basis of the prisoner's detention and that where a prisoner is committed to the county jail for a violation of a city ordinance, the cost of such imprisonment must be borne by the city. (County of Sonoma v. Santa Rosa (1894) 102 Cal. 426 [36 P. 810]; Gov. Code,  36903.)
 [2] It is equally well established that where a prisoner is confined in the county jail after having been charged with or convicted of violating a state law or county ordinance, the expense of his care and maintenance must be paid by the county, and this is true even though the prisoner may have been arrested by a city police officer. (City of Pasadena v. County of Los Angeles (1953) 118 Cal.App.2d 497 [258 P.2d 28].) [3] However, if the arresting city police officer chooses not to take advantage of a local county facility where the prisoner may be placed in the custody of the sheriff and, in the absence of any request by the county, confines the prisoner temporarily in the city jail, the cost of maintaining said prisoner must be deemed an expense voluntarily incurred by the *276 city and cannot be recouped from the county. (City of Pasadena v. County of Los Angeles, supra.)
 These rules also find expression in certain sections of the Government and Penal Codes.
 Thus, section 29602 of the Government Code provides in pertinent part that "The expenses necessarily incurred in the support of persons charged with or convicted of crime and committed to the county jail and the maintenance therein ... and for other services in relation to criminal proceedings for which no specific compensation is prescribed by law are county charges." (Italics supplied.)
 It may be noted that although the above section does not specifically refer to medical services as part of the "support" chargeable against the county, the language of the section (then Political Code, section 4307) was construed in Gibson v. County of Sacramento (1918) 37 Cal.App. 523, 527 [174 P. 935], wherein the court held that the term "support," as used in the statute, "necessarily means that the persons referred to therein are to be provided with such necessaries as may be required to sustain them under the peculiar conditions by which they are surrounded, including, of course, such necessary medical treatment as may be required. ..."
 Sections 4011 and 4011.5 of the Penal Code deal specifically with the furnishing of medical or surgical treatment. The former section provides in part that "(a) When it is made to appear to a judge of the superior court ... that a prisoner confined in any city or county jail requires medical or surgical treatment necessitating hospitalization, which treatment cannot be furnished or supplied at said city or county jail, the court in its discretion may order the removal of such person or persons from said city or county jail to the county hospital in said county; provided, if there is no county hospital in said county, then to any hospital designated by said court ..."
 "(b) The cost of such medical services and such hospital care and treatment shall be charged against the county subject to subsections (c) and (d), in the case of a prisoner in or taken from the county jail, or against the city in the case of a prisoner in or taken from the city jail, and the city or county may recover the same by appropriate action from the person so served or cared for, or any person or agency responsible for his care and maintenance. If the prisoner is in the county jail under contract with a city or under some other arrangement with the city to keep the city prisoner in the county jail, then *277 the city shall be charged, subject to subsections (c) and (d), for the prisoner's care and maintenance with the same right of recovery against any responsible person or any other agency."
 "(c) When such prisoner is poor and indigent the cost of such medical services and such hospital care and treatment shall, in the case of persons removed from the city jail be paid out of the general fund of such city, and in the case of persons removed from the county jail to a hospital other than a county hospital, such cost shall be paid out of the general fund of such county or city and county. In the case of city jail prisoners removed to the county hospital, the cost of such hospital care and treatment to be paid by the city to the county, shall be the rate per day fixed by the board of supervisors of such county. ..."
 Section 4011.5 provides for the transfer of prisoners from the city or county jail to a hospital without a prior court order where emergency circumstances justify such action. The final sentence of this section provides that "The provisions of Section 4011 governing the cost of medical and hospital care of prisoners and the liability therefor, shall apply to the cost of, and the liability for, medical or hospital care of prisoners removed from jail pursuant to this section."
 Turning now to defendant city's arguments on appeal, it is its position that since sections 4011 and 4011.5 are by their express terms applicable only to hospital services rendered to prisoners removed from the city or county jail, the hospital treatment furnished Cero does not come within their purview because such treatment was furnished before Cero could be placed in jail. However, defendant city does assert that the sections in question are helpful in arriving at the proper interpretation of section 29602 of the Government Code since they evidence a clear legislative intent that a city should not be liable for medical services rendered to prisoners in the county jail except where the prisoners in question are "city prisoners" who are confined in the county jail under a contract or some other arrangement with the city. Defendant city reasons that if the Legislature intended that cities should not be liable for medical expenses incurred on behalf of "county prisoners" confined in county jails, the Legislature must likewise have intended that cities be protected against liability for medical expenses incurred on behalf of "county prisoners" who are en route to the county jail but who have not yet actually been confined therein. This result, according to *278 defendant city, can be achieved by a liberal construction of section 29602 of the Government Code. Thus, although the section in question, by its express terms, renders the county liable only for expenses incurred in the support of persons "charged with or convicted of crime and committed to the county jail," defendant city urges that the section should be deemed applicable to any person who has been lawfully arrested on a state or county charge (rather than for the violation of a municipal ordinance) and who is thus a "county prisoner." As an alternative, defendant city suggests that medical services of the type rendered Cero should be deemed included within that clause of section 29602 which renders the county liable "for other services in relation to criminal proceedings for which no specific compensation is prescribed by law. ..."
 Defendant city's position finds support in two opinions rendered by the State Attorney General. In the first of these (41 Ops.Cal.Atty.Gen. 155), the Attorney General rejected the suggestion that the 1961 addition of subsection (c) to section 4011 of the Penal Code had made the city liable for the costs of medical treatment rendered any prisoner "in or taken from the county jail." Although noting that the language of subsection (c) so provided, the Attorney General reasoned that since the "nature of the offense" test was accepted administrative construction prior to the 1961 addition of subsection (c), said construction should not be abandoned in the absence of a clearer indication of legislative intent than that contained in the language of subsection (c). Thus the Attorney General concluded that where the city police had arrested an individual for a violation of a state penal statute and it had become necessary, prior to his arraignment and booking, to place him in a county hospital, the city was not required to reimburse the county for the cost of the hospitalization in the absence of a contract providing for such reimbursement. Since the "nature of the offense" with which the prisoner was charged was still the controlling test in determining liability as between the city and the county, the Attorney General was of the opinion that in any instance where city police officers had arrested a prisoner for violation of a state statute, with which he was ultimately booked and arraigned, medical treatment rendered such prisoner was the responsibility of the county, and this was so even though the treatment was rendered either before the prisoner *279 had been taken to the county jail or while he was being temporarily detained through necessity in the city jail pending transfer to the custody of the sheriff.
 The above opinion did not deal specifically with one facet of the problem presented by the instant case. Thus the Attorney General dealt with the county's right to reimbursement in a situation where a prisoner arrested by city police was placed in a county hospital. In the case at bar, Cero was not taken to a county hospital because the arresting officer reasonably believed that his condition required that he be taken to the nearest hospital, the Washington Township Hospital.
 However, this precise situation was the subject of a later opinion by the State Attorney General. (42 Ops.Cal.Atty.Gen. 87.) The question before the Attorney General was whether the city or county was liable for the cost of medical treatment and hospital services where a city police officer had arrested a murder suspect and, because of his need for immediate medical care, had directed that he be taken to the nearest hospital, which happened to be owned and operated by a local hospital district. The Attorney General stated that section 29602 of the Government Code rendered the county liable for the expenses necessarily incurred in the "support" of persons charged with or convicted of crime and committed to the county jail and noted that in Gibson v. County of Sacramento, supra, it had been held that such "support" included the furnishing of necessary medical treatment. The Attorney General also asserted that in Hart Bros. Co. v. County of Los Angeles (1938) 31 Cal.App.2d Supp. 766, 770 [82 P.2d 221], it had been held that in order for section 29602 to be applicable, it was not necessary that the "services" referred to in the latter part of the section have been performed by a county officer or any particular person. The Attorney General then referred to its prior opinion (41 Ops.Cal.Atty.Gen. 155) and noted that the situation there presented had differed in two respects, in that the prisoner had been taken to a county hospital and that his need for medical treatment did not exist at the time of his arrest but arose shortly thereafter. The Attorney General then went on to state: "It is submitted that these differences do not require a different result in the instant situation. Further, in light of the fact that the county jail is the proper place of confinement of a person accused of a felony, the duty of the sheriff to receive prisoners accused of a felony, and the provisions of Government Code section 29602, as construed by *280 the Gibson and Hart cases, it is concluded that the county is liable for the cost of hospitalization and medical treatment both before and after the prisoner's arraignment."
 "Were it not for the prisoner's physical injuries and need for immediate medical attention, he would have been taken to either the county jail or the city's holding facilities pending his transportation to the county jail. In either case, in the absence of a contract providing otherwise, if the prisoner became ill and required hospitalization, the cost of such hospitalization would have been the responsibility of the county. There appears to be no reason for a different rule where the prisoner is in need of medical treatment at the time of his arrest. The so-called 'nature of the offense' test has traditionally been the basis for determining liability for the cost of medical treatment and hospitalization. Accordingly, the fortuitous fact that the prisoner was in need of medical treatment at the time of his arrest rather than after his arrival at the county jail or city holding facilities should not give rise to a different conclusion. ..." (42 Ops.Cal.Atty.Gen. 87, 90-91.)
 [4] The Attorney General's contemporaneous interpretation of statutory provisions is not of controlling significance but such practical interpretation, extending over a substantial period of time, is entitled to great weight. (Carter v. Commission on Qualifications of Appointments (1933) 14 Cal.2d 179, 185 [93 P.2d 140].) [5] The Attorney General's construction of section 29602 of the Government Code would obviously best effectuate the established rule imposing upon the county, rather than the city, liability for the care and maintenance of "county prisoners" who, even though arrested by city police officers, are charged with and ultimately arraigned for a violation of a state statute or county ordinance. Moreover, it would appear that this result can be obtained without indulging in an unreasonable or unduly strained interpretation of the language of section 29602. In the instant case, the county conceded that it was liable for the cost of all medical treatment furnished Cero after his arraignment. Thus, the county's position, in essence, is that it was liable, under section 29602, for all medical expenses incurred after Cero was "charged" but that "charged," as used in said section, means formally arraigned. Defendant city and the Attorney General, on the other hand, would interpret "charged" to mean "arrested," where the prisoner in question is ultimately arraigned, as was Cero, for a violation of a *281 state law. The latter construction is clearly reasonable (see People v. Serrano (1932) 123 Cal.App. 339, 342 [11 P.2d 81]) and would appear far more consonant with the legislative intent. [6] In any event, the latter portion of section 29602 renders the county liable for the cost of "other services in relation to criminal proceedings for which no specific compensation is prescribed by law. ..." Emergency medical treatment furnished a prisoner arrested for and ultimately arraigned for a violation of a state statute can certainly be deemed to constitute "services" of this nature.
 On oral argument, defendant county suggests that section 4004.5 of the Penal Code applies to the situation before us. We are satisfied the section deals with an entirely different arrangement.
 For the reasons above stated, the judgment directing defendant city to pay plaintiff hospital district the sum of $240.80, plus costs, is reversed, and the trial court is directed to grant plaintiff judgment in the total amount prayed for against defendant county. Defendant county is to pay all costs on appeal.
 Agee, J., and Taylor, J., concurred.
NOTES
[fn. 1]  1. Although the County of Alameda and its board of supervisors were both named as defendants, they will be collectively referred to as "defendant county."
