(after stating the fads as above.) There is no doubt that the contract between the plaiutiff and the city and county of San Francisco is one within the competency of the municipality to make. It is within the power of all such bodies to provide for the health of their inhabitants by causing the removal from their limits of all dead animals not slain for human food, which otherwise would soon decay, and, by corrupting the air, engender disease. And provisions for such removal may be made by contract, as well as tbe performance of any other duty touching the health and comfort of the city; its authorities always.preserving such control over the matter as to secure an observance of proper sanitary regulations. In addition to this general power, the constitution of the state of California which was in force when the contract with the plaintiff was renovied, declares that “any county, city, or township may make and enforce within its limits all such local police, sanitary, and other regulations as are not in conflict with general laws.” Article *50611, § 11. And the consolidation act of 1863, still in force, provides that the board of supervisors shall have power “to authorize the summary abatement of nuisances; to make all regulations which may be necessary or expedient for the preservation of the public health, and the prevention of contagious diseases; to provide by regulation for the prevention and summary removal of all nuisances and obstructions in the streets, alleys, highways, and public grounds of said city and county, and to prevent the running at large of dogs, and to authorize the destruction of the same when at large, contrary to ordinance.”
The contract in question does not appear to be open to any serious objection; none is alleged against its provisions. It imposes no burden upon the municipality. The removal of the dead animals is to be made without any expense to it. The compensation of the party making the removal is found in the uses to which the animals are or may be put. Their hides are converted into leather, from some of which, shoes, from others, gloves are made. Of their bones, buttons or handles for knives may be manufactured; from their flesh and fat, various oils may be distilled for use in the arts. And in case of horned animals, glue from their hoofs and combs from their horns may be made. Indeed, all parts of the animals may be put to some useful purpose. It requires, however, for such uses, special and somewhat expensive machinery, and also, it is said, the employment of hands trained to the business. All these facilities the bill alleges have been provided by the plaintiff.
While there can, by contract, be no such restriction imposed upon the power of a municipal corporation as to preclude legislation required by the health of its people, yet a contract having for its object to secure such health is not to be disregarded, and its provisions set aside, where no charge justly lies that the purposes of the 'contract are not accomplished. It is not pretended in this case that the plaintiff has failed in any respect to comply with his contract, and that the duty assumed by him has not been fully performed. The municipality cannot disregard its contract obligations upon mere caprice, or because a pecuniary advantage may be thereby secured. When that is attempted, the courts will come to the relief of the contractor, if the party committing the injury is, with reference to the matter complained of, subject to their jurisdiction. There can be no doubt, that the pound-keeper may be reached and enjoined from delivering the animals destroyed by him to any other party than the plaintiff, or his assigns. And should the board of supervisors, by its legislation, attempt to destroy the contract, or to deprive the plaintiff of its benefit, the enforcement of such legislation may be arrested. The difficulty presented in the case before us is that the application to enjoin the passage of any resolution, order, or ordinance, which may tend to impair the obligation of the contract, is an application to enjoin a legislative body from the exercise of legislative power, and to enjoin the exercise of such power is not within the jurisdiction of a court of equity. This no one will question as applied to the power of the legislature of the state. The suggestion of any such jurisdiction of the court over that body would not be entertained for a *507moment. The same exemption from judicial interference applies to all legislative bodies, so far as their legislative discretion extends. Municipal corporations are instrumentalities of the state for the more convenient administration of local affairs, and for that purpose are invested with certain legislative power. In the exercise of that power, upon the subjects submitted to their jurisdiction, they are as much beyond judicial interference as the legislature of the state. The courts cannot in the one ease forbid the passage of a law nor in the other the passage of a resolution, order, or ordinance. If by either body, the legislature or the board of supervisors, an unconstitutional act be passed, its enforcement may be arrested. The parties seeking to execute the invalid act can bo reached by the courts, while the legislative body of the state, or of the municipality, in the exercise of its legislative discretion, is beyond their jurisdiction. The fact that in either case the legislative action threatened may bo in disregard of constitutional restraints, and impair the obligation of a contract, as alleged in this case, does not affect the question. It is legislative discretion which is exorcised, and that discretion, whether rightfully or wrongfully exercised, is not subject to interference by the judiciary.
A municipal corporation may be clothed, and generally is clothed, with other than legislative powers, and in their exercise may, in many instances, be brought under the jurisdiction and control of the courts. If, for instance, it be the holder of property as trustee, it may be required to execute the trusts assumed, and'to make such disposition of the property as the trust requires. If, being the owner of property, it contracts for its sale, the execution of the contract can be enforced as in the case of such contracts by natural persons. So, also, if it attempt to act upon matters not by its charter or law subject to its jurisdiction, it may be reminded of the limitations upon its powers, and brought to a more careful consideration of them, by the process of the courts; and if the rights of third parties will be injuriously affected by its proposed action, it may bo enjoined therefrom. It matters not in such cases that its action takes the form of legislation, when it is not, in fact, the exercise of legislative power, or upon a matter which is committed to its jurisdiction.
In what we have said of the want of authority in courts of equity over the action of a municipal corporation, we confine ourselves strictly to such action as is purely legislative, upon a matter which is, by its charter or law, made subject to its legislative discretion. That the exercise of such legislative discretion of municipal bodies shall bo exempt from judicial restraint, is declared in the laws of this state. Among the provisions of the Civil Code is one which provides that an injunction cannot be granted “to prevent a legislative act by a municipal corporation.” This was enacted in March, 1874, and is, we think, declaratory of sound doctrine, though often disregarded in practice by the courts.
With special force may this doctrine be invoked in the present case, when, in a controversy between citizens of the same state, the restraint of legislation by the city of San Francisco, which the courts of the state *508are prohibited by statute from granting, is prayed from the court of another government. It would, indeed, be an extraordinary proceeding for a court of the United States to send its process to a municipal body of a state invested by its legislature with certain legislative powers, commanding it not to taire any initiatory steps in the exercise of its legislative functions towards the passage of a resolution or ordinance, such initiatory steps in themselves vesting no right.
In Gas Co. v. City of Des Moines we have a decision of the supreme court of Iowa in accordance with the views we have expressed. 44 Iowa, 505. There it appeared that the city had, by ordinance, granted the plaintiff a valuable franchise, providing that for 15 years he should have the exclusive privilege of laying pipes in the streets and alleys of the city, and binding the company, in consideration of the privilege, to furnish gas in such quantities as might be ordered by the common council for the public offices and lamps, at a certain specified price. The gas company was willing to furnish gas under the provisions of the ordinance, and in accordance with its charter; but, notwithstanding this fact, the common council was attempting, as the bill of complaint in the case alleged, to-repeal the ordinance, and would repeal it unless restrained by the court, and its repeal would destroy the value of the property. A preliminary injunction of the circuit court of the state, granted against the passage of the repealing ordinance by the common council, was, upon motion, dissolved, and from the decree of dissolution an appeal was taken to the supreme court of the state, where it was held that the circuit court had no power to restrain the passage of the repealing ordinance. “The general assembly,” said the court, “is a co-ordinate branch of the state gov; eminent, and so is the law-making power of public municipal corporations within prescribed limits. It is no more competent for the judiciary to interfere with the legislative acts of one than the other. But the unconstitutional acts of either may be annulled. Certainly, the passage of'an unconstitutional law by the general assembly could not be enjoined. If so, under the pretense that any proposed law was of that character, the judiciary could arrest the wheels of legislation. Had the-ordinance under which the plaintiff claims been enacted by the general assembly, and the plaintiff acquired .hereunder the same rights as under the ordinance, and the general assembly thereafter attempted to enact a law in substance like the ordinance sought to be enjoined, could the judiciary interfere and by injunction restrain the action of the general assembly, on the ground that the law, if enacted, would ‘impair the obligation of contracts? ’ After its passage the judiciary may declare the law unconstitutional, (Bank v. Knoop, 16 How. 369; Dodge v. Woolsey, 18 How. 331;) but previous to that time judicial powers cannot be invoked.”
In People v. Mayor, etc., of New York, it was held, by the supreme court of the First district of New York, that the legislation of a municipal corporation 1? not subject to restraint- by injunction, but that the acts of its agents and officers, in pursuance' of resolutions or ordinances which are in violation of law, may be restrained by injunction. “The legislative power of *509that body, (the common council,)” said the court, “is a power resting in their discretion. They have a right to pass such laws and adopt such resolutions as in their judgment are proper and necessary, in reference to those matters which, by the various charters of the city, are subject to their jurisdiction. Until they have legislated upon any subject, their contemplated action is not known, and it would be equally improper for the courts to direct what the legislature should not do, as it would be to order them to adopt any particular mode of legislation.” 9 Abb. Pr. 254.
There have been other and different decisions in the courts of New York, and notably in Davis v. Mayor, etc., in the superior court, (1 Duer, 451,) and in People v. Sturtevant, in the court of appeals of that state, (9 N. Y. 263.) The question in these cases arose upon a motion for an attachment for contempt, against one of the aldermen of the city of New York, in committing a breach of an injunction restraining the mayor and aldermen of the city from granting the privilege of laying a railway in Broadway, one of the principal streets of that city. In the first case, much weight was placed upon the fact that the constitution of Now York declared that “.all corporations shall have the right to sue, and shall bo subject to be sued, in ail courts, in the like cases as natural persons.” The court said: “A corporation subject to be sued is necessarily subject to every process or order that in the commencement or in the progress of the suit may be necessary to, or be connected with, the relief which is demanded, and the words ‘in the like cases’ plainly mean for the like acts or omissions, and .for the like reasons.” But the court in its opinion went further than this, and held that a municipal body, though clothed with legislative and political powers, was in all its powers subject to the restraint and control of the courts, equally with any other body, natural or artificial, — a doctrine which, to this extent, would not now, it is believed, be advanced in any court.
In the second case, the one in the court of appeals, the court held that the act in question in that case.was not in any just sense an act of municipal legislation; that, though it took the form of a resolution, it was in substance a grant upon condition; that making a grant was not in its own nature a legislative act, but was such as had always been in the power of any court possessing equity jurisdiction to prohibit by injunction. “The corporation,” said the court, “municipal or private, is capable of being sued. As a corporate body merely, it has no immunities which set it beyond the jurisdiction of the courts. It may be enjoined from making a grant just as it may be ordered to make one.”
So many instances have occurred in the history of the country of hasty legislation by municipal bodies, and of the granting by them of valuable privileges without due compensation, under the influence of unscrupulous men, that the tendency of judicial opinion has been to encourage the interference of courts with the action of such bodies, when, under other circumstances, such interference would be disapproved; but the principle that the exercise of legislative power by a municipal body is beyond judicial control, is too important in our institutions to be *510weakened by occasional decisions in disregard of it. In New York and other states, where such interference of the courts has been sustained, there was no statute, as in California, forbidding the jurisdiction.
It follows from the views expressed that an injunction to restrain the defendant Jacob Lindo, the pound-keeper, from delivering the carcasses of any of the animals destroyed by him to any other person, except the plaintiff, or his assigns, will be granted, but the application to restrain the municipality from passing the threatened resolution, order, or ordinance, is denied.