
385 Mass. 772 (1982)
434 N.E.2d 185
MASSACHUSETTS GENERAL HOSPITAL
vs.
CITY OF REVERE.
Supreme Judicial Court of Massachusetts, Suffolk.
December 11, 1981.
April 12, 1982.
Present: HENNESSEY, C.J., LIACOS, NOLAN, LYNCH, & O'CONNOR, JJ.
Laurence S. Wolk for Massachusetts General Hospital.
Ira H. Zaleznik for the city of Revere (Valerie L. Pawson for the city of Revere and Carl Valvo, Assistant Attorney General, for the Commonwealth, with him).
NOLAN, J.
On September 20, 1978, city of Revere police responded to a reported breaking and entering in progress. *773 Upon arrival at the scene, they observed Patrick M. Kivlin with a suitcase and a pillowcase. Kivlin fled and, after repeated warnings to stop and one warning shot, was shot by a police officer. The police summoned an ambulance, which took Kivlin, accompanied by a police officer, to Massachusetts General Hospital (hospital). Kivlin was admitted and remained a patient at the hospital until September 29, 1978.
On September 26, 1978, a warrant issued in the Chelsea Division of the District Court Department for Kivlin's arrest on charges of breaking and entering in the nighttime, larceny, and conspiracy. On September 29, 1978, Kivlin was discharged by the hospital[1] into the custody of the Revere police department and was taken by the police to the Chelsea District Court for a probable cause hearing. The judge granted a continuance to Kivlin[2] and released him on personal recognizance.[3] On October 27, 1978, prior to the probable cause hearing, Kivlin returned to the hospital for treatment, including surgery.[4] He was released on November 10, 1978.[5] A bill for Kivlin's first admission at the hospital was sent to the Revere police department. The chief of police of Revere, responding to the request for payment, stated in a letter to the hospital that Revere had no provision for payment of the bill.
The hospital commenced this action against Revere seeking to recover the full cost of the medical services rendered *774 to Kivlin during both stays at the hospital. Revere answered and filed a third-party complaint against Kivlin and the Commonwealth for reimbursement. The hospital moved for summary judgment, and the case was referred to a special master. Thereafter, upon the master's recommendation, a Superior Court judge denied the hospital's motion for summary judgment, dismissed the complaint and third-party complaint, and entered judgment in favor of Revere. Mass. R. Civ. P. 56 (c), 365 Mass. 824 (1974). The hospital appealed, and we transferred the case to this court on our own motion.
The hospital claims, both on contractual and constitutional grounds, that Revere is obligated to pay for the necessary medical services provided to Kivlin. While there is no contractual basis for recovery, we hold that the constitutional prohibition against cruel and unusual punishment, embodied in the Eighth Amendment to the United States Constitution, requires that Revere be liable to the hospital for the medical services rendered to Kivlin during his first stay at the hospital, but not during his second stay.
1. Contract. The hospital contends, first, that some kind of implied contract between the hospital and Revere was concluded when the police brought Kivlin to the hospital and he was admitted for treatment. We disagree.
Several prerequisites must be in place before a municipality can be said to have entered into a valid contract. First among these is an underlying authority in the municipality to make the contract. Lord v. Winchester, 355 Mass. 788, 789 (1969). We have found no basis, either statutory or in common law, that gives to Revere the authority to contract with a hospital for the care and treatment of a suspect shot while attempting to evade police. Municipalities are given the power to contract for health services, G.L.c. 40, § 4, but those contracts may be entered into only by a board of health or a "legally constituted board performing the powers and duties of a board of health." G.L.c. 40, § 4, sixth par., inserted by St. 1965, c. 874, § 3. Here, the hospital sent its bill to the Revere police department, an agency *775 not performing the powers and duties of a board of health. The hospital, admitting that there are no statutes authorizing its purported contract with Revere, looks hopefully to the common law for authority. There is no such authority. There can be no contract with Revere unless statutory requirements are fulfilled. See Urban Transp., Inc. v. Mayor of Boston, 373 Mass. 693, 696 (1977); Richard D. Kimball Co. v. Medford, 340 Mass. 727, 729 (1960).
In addition to the necessity for an underlying authority for a municipality to contract, any contract made on behalf of a city must be made by a duly authorized agent. Lord v. Winchester, supra. The powers of police officers are delineated in detail in G.L.c. 41, § 98. Nowhere in § 98 is the power to contract given to police. They do not have such power, and are not, therefore, a duly authorized agent of a city to contract.
Furthermore, even if the police had the authority to contract, several statutory requirements for a valid contract were not met. All contracts made by city departments in excess of $2,000 must be in writing and approved by the mayor. G.L.c. 43, § 29. Except in an emergency, a city department could not incur liabilities in excess of its appropriation. G.L.c. 44, § 31. In an emergency, arguably the case here, the city council must approve the expenditure. G.L.c. 44, § 31. "Persons dealing with a municipality must take notice of limitations of this kind upon the contracting power of the municipality and are bound by them and cannot recover upon contracts attempted to be made in violation of them." Duff v. Southbridge, 325 Mass. 224, 228 (1950), quoting from Adalian Bros. v. Boston, 373 Mass. 629, 631 (1949). See also Quincy v. Brooks-Skinner, Inc., 325 Mass. 406, 413 (1950); Fluet v. McCabe, 299 Mass. 173, 178 (1938); Morse v. Boston, 253 Mass. 247, 252 (1925). That the city may have benefited by the hospital's actions is irrelevant to this issue. The statutes are controlling. Fluet v. McCabe, supra. There is no basis sounding in contract for recovery in this case. See Windham Community Memorial Hosp. v. Willimantic, 166 Conn. 113 *776 (1974); Trinity Hosp. Ass'n v. Minot, 76 N.W.2d 916 (N.D. 1956).
The hospital is in no better position on a theory of quantum meruit. Where a contract is illegal by reason of failure to comply with statutory requisites, we will not allow recovery based on quantum meruit. Lowell v. Massachusetts Bonding & Ins. Co., 313 Mass. 257, 272 (1943). To do otherwise would, in effect, nullify the statutory scheme with respect to contracts with municipalities. McGovern v. Boston, 229 Mass. 394, 397-398 (1918). See 15 S. Williston, Contracts § 1786A, at 343-344 (3d ed. 1972). The case of Long v. Athol, 196 Mass. 497 (1907), is not to the contrary. In Long there was a valid contract set aside by the court because of mutual mistake as to the estimate of the amount of work to be done. There the municipality was held liable in quantum meruit for services rendered under what was, at the time the services were rendered, a legal contract. In the instant case no contract was ever executed. Mistake, even if mutual, as to the authority or power of a municipality to contract, is not the type of mistake which will allow recovery in quantum meruit. A good faith rendering of services in such a situation does not warrant violation of the statutory arrangement. Fluet v. McCabe, supra at 178.
2. Eighth Amendment. The hospital argues that the prohibition against deliberate indifference to the medical needs of prisoners contained implicitly in the Eighth Amendment[6], Estelle v. Gamble, 429 U.S. 97 (1976), compels a government agency or division responsible for supplying those medical needs to pay for them.[7] We agree. Kivlin *777 was a prisoner in the custody of the Revere police during his first stay in the hospital from September 20 to September 29. We rule that Revere is liable for the expenses of this confinement. Kivlin was not in the custody of the Revere police when he readmitted himself on October 27, however. Accordingly, we find Revere liable only for Kivlin's first confinement.
Revere cites Estelle v. Gamble, supra, for the proposition that a government's obligation to refrain from deliberate indifference to the serious medical needs of a prisoner is limited to those "whom it is punishing by incarceration." Id. at 103. Since Kivlin had not been incarcerated when he was brought to the hospital, continues Revere, the rule of Estelle v. Gamble, supra, does not apply. It is not the fact of incarceration, however, that triggers the protections afforded by the Eighth Amendment. Rather, it is the suspect's loss of freedom when he "cannot by reason of the deprivation of his liberty, care for himself," id. at 104, quoting from Spicer v. Williamson, 191 N.C. 487, 490 (1926), that requires the government to begin to provide medical care. Cf. Dodge City Medical Center v. County Comm'rs in Gray County, 6 Kan. App. 2d 731 (1981) (where a suspect is apprehended in the commission of a felony, felled by a police bullet, and taken to a hospital for treatment, he is "in custody" for the purpose of determining the government's liability for his medical expenses while hospitalized, even if he is not formally arrested or kept under guard). See Lutheran Medical Center v. Omaha, 204 Neb. 292, 297 (1979); Ramsey v. Ciccone, 310 F. Supp. 600, 605 (W.D. Mo. 1970).
*778 Revere proposes that until September 26, when a warrant for his arrest issued, Kivlin was not under arrest and had, therefore, not lost his freedom so as to bring into play the Eighth Amendment. This argument is specious.
Kivlin was shot by police after repeated warnings to stop, at a time when he was purportedly engaged in committing a felony. Courts have delineated three elements that should be examined in determining when a person is placed under arrest. To constitute an arrest, "`[1] there must be an actual or constructive seizure or detention of the person, [2] performed with the intention to effect an arrest and [3] so understood by the person detained.' ... `[T]he test must be not what the defendant ... thought, but what a reasonable man, innocent of any crime, would have thought had he been in the defendant's shoes.'"[8]Hicks v. United States, 382 F.2d 158, 161 (D.C. Cir.1967), quoting from Jenkins v. United States, 161 F.2d 99, 101 (10th Cir.1947), and United States, v. McKethan, 247 F. Supp. 324, 328 (D.D.C. 1965). See also Commonwealth v. Meehan, 377 Mass. 552, 558-559 (1979), cert. dismissed as improvidently granted, 445 U.S. 39 (1980); Commonwealth v. Avery, 365 Mass. 59, 65 (1974).
We need not determine at exactly what point the police effectuated an arrest of Kivlin. Certainly at the time the police bullet entered his body he was under arrest. He was intentionally seized by the police at that moment and a reasonable person could only believe that he was then under arrest.
Kivlin was brought to the hospital as a prisoner. Revere had a legal duty to supply him with necessary medical care.[9]*779 Estelle v. Gamble, 429 U.S. 97 (1976). To ensure Kivlin's right to medical care, Revere must be held liable to the hospital for the medical services it rendered. See Lutheran Medical Center v. Omaha, supra; Dade County v. Hospital Affiliates Int'l, Inc., 378 So.2d 43 (Fla. Dist. Ct. App. 1979) (dictum that government is assumed liable to a hospital which renders medical services to its prisoners). That funds may not have been appropriated for this purpose is no excuse, because inadequate funding will not excuse deprivation of rights guaranteed by the Constitution. Blaney v. Commissioner of Correction, 374 Mass. 337, 342 n. 3 (1978). See Smith v. Sullivan, 611 F.2d 1039, 1043-1044 (5th Cir.1980); Williams v. Edwards, 547 F.2d 1206, 1212-1213 (5th Cir.1977); Finney v. Arkansas Bd. of Correction, 505 F.2d 194, 201 (8th Cir.1974). Further, that such payment may be a violation of State or local law will not avail Revere of any relief from the payment. Smith v. Sullivan, supra.
Reflective of the discussion above, we hold that Revere is liable to the hospital for the stipulated charges incurred for Kivlin's initial stay in the hospital, from September 20, 1978, to September 29, 1978. Entry of summary judgment for Revere with respect to payment for Kivlin's first stay in the hospital was error. On the pleadings and stipulations before us, partial summary judgment should have been entered for the hospital. Mass. R. Civ. P. 56 (a), 365 Mass. 824 (1974).[10]
Kivlin's second stay in the hospital, from October 27, 1978, to November 10, 1978, represents a different situation. The rationale supporting the government's responsibility for the medical needs of its prisoners is that, being in custody, the prisoners cannot provide for these needs themselves. Estelle v. Gamble, supra at 104. "Confinement strips prisoners of the ability to provide themselves with the *780 basic necessities for living. Thus, the constitution places a duty on prison officials to maintain the well-being of inmates. The duty extends to those needs which the prisoners are unable to provide because of their confinement" (emphasis added). Tunstall v. Rowe, 478 F. Supp. 87, 89 (N.D. Ill. 1979). See Spicer v. Williamson, supra at 490. Once Kivlin was released on personal recognizance, on September 29, he was no longer in the custody of the Revere police or of any other authority. See Opinion of the Justices, 201 Mass. 609, 611 (1909) ("the acceptance of bail while a prosecution is pending is a waiver of the right of the State, for the time being, to insist upon the custody of the person of the accused"). That Kivlin was under an obligation to return to court did not place him in the custody of anyone. He was under no greater restriction than one who had been subpoenaed to testify in court as a witness. It was Revere's custody of his body that established his right to medical treatment here. See Ramsey v. Ciccone, 310 F. Supp. 600 (W.D. Mo. 1970).[11] For this reason, summary judgment was correctly entered for Revere with respect to payment for Kivlin's second stay in the hospital.
The judgment of the Superior Court is affirmed with respect to liability for Kivlin's second stay at the hospital. We reverse that portion of the judgment which concerns Kivlin's first stay at the hospital. The case is remanded to the Superior Court for the entry of judgment against Revere for charges stemming from Kivlin's first admission.
So ordered.
NOTES
[1]  During this period, the bill for services rendered to Kivlin at the hospital was $7,948.50.
[2]  Probable cause was found at a hearing on December 1, 1978.
[3]  The parties stipulated that if the judge had not released Kivlin on personal recognizance and Kivlin had been unable to make bail, he would have been sent by the Chelsea District Court to the "Charles Street House of Correction" or a similar house of correction. See Mass. R. Crim. P. 7 (a) (1), 378 Mass. 855 (1979).
[4]  Nowhere in the record is it stated in what circumstances or for what medical problems Kivlin was readmitted to the hospital.
[5]  The bill for services rendered to Kivlin at the hospital during this period was $5,360.41.
[6]  The Eighth Amendment to the United States Constitution provides: "Excessive bail shall not be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted." The Eighth Amendment has been made applicable to the States by the Fourteenth Amendment. See Robinson v. California, 370 U.S. 660 (1962). The plaintiff does not invoke the Massachusetts Constitution, though art. 26 of the Declaration of Rights contains a prohibition against the infliction of "cruel or unusual punishments."
[7]  We recognize that there may be a question as to the hospital's standing to raise a claim under the Eighth Amendment in this context. No such question was raised or argued in the briefs before us. Consequently, we deem the issue waived. Mass. R.A.P. 16 (a) (4), as amended, 367 Mass. 919 (1975).

Furthermore, standing to litigate constitutional issues is sometimes granted to persons asserting the rights of others, especially when it would be difficult for the person whose rights are asserted to litigate them. See C.A. Wright, Law of Federal Courts 50-51 (3d ed. 1976). Cf. Barrows v. Jackson, 346 U.S. 249 (1953) (party allowed to assert constitutional rights of third persons who, in the future, would find it more difficult to buy property if party not allowed to litigate constitutional issue).
[8]  This test was established in the context of the Fourth and Fifth Amendments to the United States Constitution. The essence of police custody necessary to raise the Eighth Amendment right to be free of cruel and unusual punishment cannot be less stringent than the circumstances necessary to establish custody under the Fourth or Fifth Amendments.
[9]  Further, had Kivlin refused the proffered care, he could have been compelled to submit to treatment. Commissioner of Correction v. Myers, 379 Mass. 255 (1979).
[10]  The result that we reach under the constitutional banner is entirely consistent with the legislative policy toward prisoners. See G.L.c. 127, § 32 (prisoners are to be treated with "kindness"); G.L.c. 127, § 90A (release of prisoners requiring treatment in medical facilities); G.L.c. 127, § 117A.
[11]  We recognize that a person released on bail or on his own recognizance is considered "in custody" within the meaning of 28 U.S.C. § 2241 (1976), with respect to the jurisdiction of a Federal court to rule on a petition for habeas corpus. Thames v. Superior Court, 383 F. Supp. 41, 43 (D. Mass. 1974). That a person is "in custody" for one purpose does not make him "in custody" for all purposes. The logic of the Eighth Amendment proscription of indifference to serious medical needs of prisoners extends only to those in physical custody.
