Plaintiff was arrested by a police officer of defendant for vagrancy, without a warrant, no public offense being shown to have been committed in his presence. He was tried on the verbal charge of vagrancy, under the city ordinances of Salt Lake, in the police court, without any written complaint being filed against him. Plaintiff interposed a plea of not guilty, was tried, and convicted of the offense charged, and sentenced to imprisonment in the city jail for a period of 60 days. He was afterwards held by the jailer of the city jail without any commitment from the police court. Through the direction of the chief of police and jailer, he, with other prisoners, was placed in the custody of guards, and set at work breaking rock for Salt Lake City, under the sheds prepared for that purpose by the city marshal, and for the protection of city prisoners. These sheds were located near a stone quarry, which was in charge of the street supervisor. The broken rock was used for repairing sidewalks in the city. While so engaged in breaking rock, plaintiff was injured by being struck in the eye by a piece of rock broken by a fellow prisoner, which injury caused the loss of the sight of his eye. Under objection, a reso*404lution oí tbe city council was introduced in evidence, recommending that the city marshal be directed to employ city prisoners on such work as, in his judgment, may be for the best interests of the city. The city marshal did not know of this resolution at the time plaintiff was set at work. This action was brought to recover damages for wrongfully, unlawfully, and negligently compelling plaintiff to perform said work, whereby the sight of one of plaintiff’s eyes was destroyed, and that of the other greatly injured, through the negligence and unlawful acts of the defendant. The defendant appeals from the judgment obtained by the plaintiff.
Appellant contends that the conviction and imprisonment of the plaintiff were illegal; that the act of the chief of police in requiring the plaintiff to work was illegal and wrongful; that the city is not liable for the ultra vires acts of its officers and servants, even though attempted to be authorized by the city; that the city could not ratify a void act, and is not liable for the unlawful acts of its officers and agents. Section 5305, Comp. Laws Utah 1888, contemplates that a written complaint, on oath, shall be filed, except in specific cases, and then a sworn complaint must be immediately filed with the magistrate, or an accusation made, and entered in the minutes of the court, specifying the charge against any person arrested for an offense. Section 5350, Comp. Laws Utah 1888, requires that a certified copy of the judgment, or an order of commitment, shall be delivered to the proper officer after judgment, as a warrant for the execution of the judgment. These requirements of the statute were not complied with. The plaintiff was sentenced to 60 days’ imprisonment. There is no provision in our statute, under such a sentence, whereby he could be compelled to work or labor. To require work from him under such circumstances *405would be, in effect, the imposition of an additional sentence by the police officers over and above the sentence imposed by the police magistrate. The city ordinances were not pleaded or placed in evidence, and therefore cannot be considered. Estee, Pl. & Prac. § 188; Shanfelter v. Mayor of Baltimore (Md.), 31 Atl. 439; City of McPherson v. Nichols (Kan. Sup.), 29 Pac. 679.
It therefore appears that the plaintiff was wrongfully and illegally imprisoned, and that he was wrongfully and illegally required to work breaking rock at the time he received the injuries complained of, and these illegal acts were done and authorized by the chief of police, acting as city marshal and jailer of the city, and three guards appointed to watch over the prisoners. To create a liability on the part of the city, it is necessary that the act done which was injurious to the plaintiff was within the scope of the corporate powers of the city as prescribed by its charter; that is, the act must not have been ultra vires in the sense that it was not within the power or authority of the corporation to act with reference to it. If such act complained of was wholly outside of the general or special power of the corporation as conferred by statute, the corporation cannot be made liable to an action for damages, whether it commanded and directed the act to be done, or whether it was done by its officers without its direction; for no municipal corporation can be impliedly liable to a greater extent than it could make itself by express corporate action. But, if the wrongful act was not ultra vires, it might be the basis of an action of tort against the corporation, whether done by its officers under direct authority, or ratified by it, or whether done by the officers of the corporation in the execution of its corporate powers and duties of a ministerial nature, if done so negligently or unskillfully as to injure others, *406in which case the corporation would be liable for the carelessness and want of skill of such officers in the course of their authorized employment, without expressly ratifying or adopting the act. So, where a corporation appoints or elects its officers,' and has power to control them in the discharge of their duties, can continue or remove them from office, and hold them responsible for the manner in which they discharge their trust, with reference to the corporate powers, and which are for the corporate benefit in its local interest, then such officers are agents of the corporation, and the maxim respondeat superior applies. But, if the officers are elected or appointed by the city government in obedience to a statute or chartered power to perform a public service not particularly local or corporate in its nature, but because the mode of selection is deemed expedient by the legislature in distributing the powers of government, if they are independent of the corporation as to tenure of office and the manner of discharging their duties-, then they are not to be regarded as servants or agents of the corporation, for whose acts or negligence it is impliedly liable, but they would be regarded as public or state officers, with such powers and duties as the statute confers upon them, and the doctrine of respondeat superior is not applicable. So that, in order to make the corporation impliedly liable for the wrongful acts of an officer, it must not only be shown that the officer was its officer, either generally as respects the particular wrong complained of, and not an independent public officer acting under his own discretion as to the manner of discharging his duties, nor as a public agent, and also that the wrong was done by such officer in the legitimate exercise of some duty of a corporate nature which was devolved upon him by law, or by the express direction or authority of *407tbe corporation, and within the scope of its chartered powers.
Within the principles mentioned, it is held that police officers appointed by a city are not its agents or servants, so as to render it responsible for their unlawful or negligent acts in the discharge of their duties, and that the city is not liable for assaults and batteries committed by its police officers, although done in an attempt to enforce an ordinance of the city, or for an arrest made by a police officer which is illegal for want of a warrant, or for unlawful acts of violence in the exercise of his official duties. The municipal corporation, in all these and like cases, represents the state or the public. The police officers are not, in such cases, the servants of the corporation. The principle of respondeat superior does not apply, and the corporation is not liable, unless the statute expressly creates the liability. 2 Dill. Mun. Corp. §§ 968-980; Jones, Neg. Mun. Corp. §§ 172, 173; Stoddard v. Village of Sara-toga Springs, 127 N. Y. 261; Smith v. City of Rochester, 70 N. Y. 506; Calwell v. Boone, 51 Iowa 687; Town of Odell v. Schroeder, 58 Ill. 353; 1 Shear. & R. Neg. § 300; Mechem Ag. §§ 111, 112; Alamango v. Board of Sup’rs, 25 Hun 551; Curran v. City of Boston, 151 Mass. 505; Mayor of Albany v. Cunliff, 2 N. Y. 165; Peters v. City of Lindsborg, 40 Kan. 654.
In Cahoell v. Boone, 51 Iowa 687, it is held that police regulations of a city are not made and enforced in the interests of the city in its corporate capacity, but in the interests of the public, and that a city is not liable for acts of its officers in attempting to enforce such regulations. Nor can it be made liable for or ratify torts of police officers. Town of Odell v. Schroeder, 58 Ill. 353.
Curran v. City of Boston, 151 Mass. 505, is a case where an inmate of a work house belonging to the city, con*408victed of a misdemeanor, and legally sentenced to confinement, was injured by tbe negligence of its agents while he was in the exercise of due care. It also appeared that the city derived a revenue from the proceeds of the work house. The court held that the city could not be held liable in damages, and said: “Nor do we perceive any reason why the city should be held responsible because some revenue is derived from the labor of the inmates. It is required that these inmates should be kept at work, by the statute, but the institution is not conducted with a view to any pecuniary profit. It is not suggested that the expenses of maintaining the work house are met by what is derived from the labor of the inmates, or that any profit above them is made. Even if the entire expense is not met by taxation, by reason of the profit thus derived, such profit is purely incidental.” In Mayor of Albany v. Cunliff, 2 N. Y. 165, the city of Albany built a bridge under an unconstitutional statute. The bridge fell in consequence solely of the negligent and improper manner in which it had been constructed by the city. It was held that the city was not liable to an action for damages at the suit of a person injured by the accident. In Ball v. Town of Woodbine, 61 Iowa, 83, it was held that a city was not liable for the consequences of a violation of the city ordinances by the mayor and common council any more than it would be if the illegal act was committed by a private person. It may safely be asserted that torts or wrongful acts of an agent or officer of a municipal corporation, not resting upon contract, but which are “ultra vires,” in the proper sense and meaning of the term, will,, not create any implied liability on the part of the corporation. 2 Dill. Mun. Corp. § 969. In this case the plaintiff was illegally imprisoned by the chief of police and jailer. He was sentenced to 60 *409days in jail. When the officers required him to work, they undertook to impose a burden upon him that the sentence did not warrant, and which the law did not justify, even if the sentence was valid. When the city council passed the resolution directing the city marshal to employ city prisoners on such work as, in his judgment, would be for the best interests of the city, they gave no directions to the marshal to require work from those in jail who were not prisoners. A prisoner is a person deprived of his liberty by virtue of a judicial or other lawful process. Nor did the resolution require the marshal to compel prisoners to work who were not sentenced to hard labor, and therefore could not be required to work. The resolution did not. direct the chief of police or marshal to do an illegal act. The jailer had no mittimus with which to retain the plaintiff. The law has not vested police magistrates and policemen with power to arrest and imprison men at pleasure, without complaint, warrant, or commitment, except as provided by law. The liberty of a citizen cannot be so far disregarded and trifled with that any policeman or jailer may, at his own volition, commit, and hold him in custody, and compel him to work until it suits his convenience to release him. The constitution of this state prohibits such acts except by due process of law. The liberties of the people depend upon a broader and firmer foundation than the mere will and pleasure of such officers. All legal imprisonment arises from the sentence and act of law, and such imprisonment must be reached through such proceedings as the laAV directs. The chief of police had no authorit3 to require the plaintiff to break stone, any more than he had authority to impose an additional sentence upon him, or to require the same work from a total stranger. The authority given by the city referred only to those legally *410imprisoned under legal sentence to bard labor, and no others. The plaintiff was not a prisoner meant or referred to by the order. The chief of police and jailer, in imprisoning the plaintiff, and in requiring him to work breaking stone at the time he was injured, were acting ultra vires. They were not acting as the agents of the city government, but were mere trespassers, acting without authority, and outside of any general or special authority or power of the corporation as conferred by its charter; and the corporation is not liable to the action for damages, although the officers, the authors of the injury, may be liable therefor. The court erred in refusing to grant the nonsuit asked by the defendant, and in refusing to give the defendant’s request to return a verdict for the defendant. The judgment of the court below is reversed, and a new trial granted.
Zane, C. J., and Bartch, J., concur.