Harrison, J.
The petitioner is held by the sheriff of Kings county under a warrant of arrest issued by a justice of the peace of Lucerne township in that county, *274upon a complaint charging him with having, on the 18th of April, 1894, sold at his saloon in the city of Hanford certain intoxicating liquor, in violation of an ordinance of the board of supervisors of Kings county. The ordinance which the petitioner is' charged with violating is entitled “An ordinance for the purpose of regulation, relating to saloons and other places where intoxicating liquors are sold, given away, or in any manner disposed of,” and makes it unlawful for any person to sell any intoxicating liquor at a saloon between the hours of ten o’clock, p. m., and five o’clock, A. m., of the succeeding day. The city of Hanford is a municipal corporation of the sixth class, organized under the municipal government act of March 13, 1883, and had prior to the 13th of April, 1894, passed an ordinance providing for the [issuance of licenses for the sale of intoxicating liquors. The petitioner had complied with the provisions of this ordinance, and had received from the city of Hanford a license to carry on the business of retailing liquor within that city, which was in force at the time of his arrest. It is contended on the part of the petitioner that he is illegally held, for the reason that the supervisors of Kings county are without any police authority within the city of Hanford; that the ordinance passed by that body under which he was arrested is limited in its operation to those portions of the county not included within the boundaries of any municipality therein.
A municipal corporation can exercise only such powers as have been expressly or by necessary implication conferred upon it by law. These powers are to be found in its charter, or in. some provision of the statute or constitution of the state wherein it is organized. Any ordinance passed by it within the scope of the authority expressly conferred upon it has the same force within the corporate limits as a statute passed by the legislature itself has throughout the state. (1 Dillon on Municipal Corporations, sec. 308; Village of Carthage v. Frederick, 122 N. Y. 268; 19 Am. St. Rep. 490.) Each derives its *275authority from the same source, and is an exercise of legislative power which has been conferred by the people. In the one case the power is exercised directly by the legislature, and in the other it is the exercise of a delegated power which has been authorized by the constitution, but in both cases the source of the' power is the same. Any inconsistency between the two is to be resolved in favor of the ordinance, upon the principle that of two statutes containing inconsistent provisions that which is later in date is a repeal by implication of the earlier one, and upon the further principle that a statute making particular provision for a designated objeet or district will be deemed to contain the legislative will for that object or district, and will prevail over a general law applicable to the state at large. (State v. Clarke, 54 Mo. 17; 14 Am. Rep. 471; State v. Clarke, 25 N. J. L. 54; St. Johnsbury v. Thompson, 59 Vt. 301; 59 Am. Rep. 731; Daw v. Metropolitan Board of Works, 12 Com. B., N. S., 161; Sutherland on Statutory Construction, see. 140.) The adoption of the ordinance being the exercise of a delegated legislative power, is to be construed with the same effect as if it had been adopted by the legislative power itself. Upon this principle ordinances passed by a municipality whose territory is included within a county will supersede any ordinance of the county upon the same subject. Each being the exercise of a legislative power derived from the same source, is to be construed as though each had been the exercise of that power by the legislature itself.
’ Section 6 of article XI of the constitution provides: “ Corporations for municipal purposes shall not be created by special laws; but the legislature by general laws shall provide for the incorporation, organization, and classification in proportion to population of cities and towns, which laws may be altered, amended, or repealed.”
Under this authority the legislature, in 1883 (Stats, of 1883, p. 93), adopted a municipal government act for the incorporation and organization of cities. Section 1 of this act provides: “Any portion of a county contain*276ing not less than five hundred inhabitants, and not incorporated as a municipal corporation, may become incorporated under the provisions of this act, and when so incorporated shall have the powers conferred, or that may be hereafter conferred by law, upon municipal corporations of the class to which the same may belong.” By virtue of this act the city of Hanford has been carved out of the territory of Kings county, and organized into a city with the powers conferred by the act.
Section 1 of article XI of the constitution provides: “Any county, city, town, 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.” The power to make these regulations is by this section conferred upon the city as well as upon the county, and must be held to be equally authoritative in each. It is a portion of the lawmaking power which the people through their constitution have conferred upon these respective bodies, and its exercise is entitled to the same consideration and to receive the same obe dience as that portion of the same power which by the same instrument has been conferred upon the legislature. The regulations made under this authority are none the less a part of the law because the authority to make them is conferred immediately by the constitution, than if it had been conferred mediately through’ an act of the legislature. The only limitation upon the exercise of the power is that the regulations to be made under it shall not be “ in conflict with general laws.” As this limitation applies equally to regulations of the county and the city, it cannot be held by the terms of the limitation that the regulation of either of these bodies is a general law for the other, and it is held that an ordinance passed by a county is not a “general law” within the meaning of this section of the constitution. (Ex parte Campbell, 74 Cal. 25; 5 Am. St. Rep. 418.)
The constitution recognizes the division of the state into counties, and has authorized the legislature to establish for them a uniform system of government; *277but it has also authorized the creation of other municipalities within the boundaries of the several counties, and has given to such municipalities the same power of legislation upon these enumerated subjects as is conferred upon the counties themselves; and the power thus conferred by the constitution is to be construed, if possible, in such a way as to give full effect to its exercise by each of the designated bodies. It is no more necessary that there be a conflict between the power thus to be exercised by the county and the city than if the authority of each had been derived through an act of the legislature. It is not to be supposed that it was the intention of the people through their constitution to authorize a county to exercise the same power within the territory of the city as the city itself could exercise, or to confer upon the county the right to interfere with or impair the effect of similar legislation by the city itself. Mr. Dillon says (1 Dillon on Municipal Corporations, sec. 184): “There cannot be at the same time within the same territory two distinct municipal corporations exercising the same powers, jurisdictions, and privileges.” Full effect can be given to the section by holding that each has been given the exclusive right of legislation within its own particular boundaries. By the organization of a city within the boundaries of a county the territory thus organized is withdrawn from the legislative control of the county upon the designated subjects, and is placed under the legislative control of its own council; and the principle of local government which pervades the entire instrument is convincive of the intention to withdraw the city from the control of the county, and to deprive the county of any power to annul or supersede the regulations of the city upon the subjects which have been confided to its control. In Ex parte Wolters, 65 Cal. 269, there was nothing in the record to indicate whether the ordinance then under consideration was for the purpose of revenue or regulation, or for both. In their brief counsel for the petitioner expressly stated •that the purpose of the writ was to test the question of *278the power of the board of supervisors to exact from persons transacting business in the county a license tax for revenue purposes. The right of the county of Butte to exercise within any city in the county the police power conferred by section 11 of article XI of the constitution was not presented or considered by the court, and counsel expressly disclaimed any intention to argue that question. It did not even appear that the sale of the liquor for which the defendant was under arrest was made within the limits of any city. In Ex parte Campbell, 74 Cal. 25, 5 Am. St. Rep. 418, where an ordinance of the city of Pasadena prohibiting the sale of wines or liquors in saloons and bar-rooms was under consideration, it was held that any regulations of the county of Los Angeles could not have the power to divest the authorities of the city of the right to legislate upon the same subject and enforce such regulations within the city limits. In re Lawrence, 69 Cal. 608, presented the single question whether the county as well as the city had the right to collect a license tax for the business of selling liquor, and did not involve any question of the exercise of a police power.
We are clearly of the opinion that the ordinance of the board of supervisors of Kings county is inoperative within the city of Hanford, and that the petitioner is illegally restrained of his liberty, and must he discharged; and it is so ordered.
De HaveN, J., Fitzgerald, J., Van Fleet, J., and Beatty, C. J., concurred.