
8 Cal.2d 639 (1937)
CITY OF OAKLAND (a Municipal Corporation), Respondent,
v.
A. A. BROCK, as Director of Agriculture, etc., Appellant.
S. F. No. 15555. 
Supreme Court of California. In Bank.  
April 27, 1937.
 U.S. Webb, Attorney-General, and Siebert L. Sefton, Deputy Attorney- General, for Appellant.
 F. B. Fernhoff, City Attorney, Homer W. Buckley, Assistant City Attorney, Decoto & St. Sure and Stanley R. Sterne for Respondent.
 SHENK, J.
 The City of Oakland filed a complaint in the superior court asking for declaratory relief and an injunction to restrain the defendant, as director of agriculture, from withdrawing his approval of municipal inspection of slaughter houses maintained outside the city's boundaries but from which meat products are furnished to the inhabitants of the city. The defendant's general demurrer to the complaint was overruled. He declined to answer and the court entered judgment declaring the extraterritorial inspection by the plaintiff of the slaughter houses involved to be authorized and valid and decreeing that the defendant Brock continue his approval of such municipal inspection. The defendant appealed from the judgment.
 The complaint alleges the maintenance of a meat inspection department by the city; the existence of four slaughter houses in contiguous incorporated territory in which meat inspection departments are not maintained and from which eighty per cent of the meat from the animals slaughtered is sold within the corporate limits of the City of Oakland; the adoption in *641 1928 of Ordinance No. 4123, New Series, reenacted in 1932 as part of the Municipal Code of Oakland, providing for inspection of slaughter houses, and the continued inspection service thereunder of such outlying slaughter houses; the enactment of state legislation (Stats. 1931, p. 567; Stats. 1933, p. 60), providing for state inspection of slaughter houses and approval by the director of agriculture of municipal inspection thereof; the previous approval pursuant thereto of the plaintiff's inspection of such outlying slaughter houses; and the threatened withdrawal by said director of his approval of the municipal inspection of such outlying slaughter houses on the ground of alleged lack of authority to approve municipal inspection of slaughter houses outside the limits of the municipality.
 The only allegation in the complaint respecting the provisions of Ordinance No. 4123, New Series, is the following: "That in and by the terms of said ordinance, and in section 55 thereof, it is provided for the inspection of meats at slaughter houses lying outside the corporate boundaries of the said City of Oakland when meats therefrom are sold within said City of Oakland."
 [1] This court will not take judicial notice of municipal ordinances in a proceeding originating in the superior court. (Marysville Woolen Mills v. Smith, 178 Cal. 786, 791 [175 P. 13]; 10 Cal.Jur., p. 705.) [2] The allegation therefore limits the question to whether and under what circumstances, if at all, a municipality has power to prescribe extraterritorially the standards of sanitation and purity maintained by slaughter houses which sell their products within the municipality.
 [3] A municipal corporation has generally no extraterritorial powers of regulation. It may not exercise its governmental functions beyond its corporate boundaries. (Const., art. XI, sec. 11; Von Schmidt v. Widber, 105 Cal. 151 [38 P. 682]; Mulville v. City of San Diego, 183 Cal. 734 [192 P. 702]; 4 McQuillin on Corporations, sec. 1434; 18 Cal.Jur., p. 803.) To this rule there are some well-recognized exceptions, but the allegations of the complaint do not bring the case stated by the plaintiff within any of them. It is assumed that the city has authority to provide for inspection of meat sold within the city and of slaughter houses situate within its limits. The facts alleged, however, do not make *642 out a case where extraterritorial exercise of its function of regulation and inspection is indispensable or even necessary to the performance of its duty or concern in safeguarding the health of its citizens. [4] The law recognizes that a municipality may enforce compliance with its standards by persons selling within its confines perishable food commodities which have been produced beyond its boundaries by requiring a permit or license to sell within the city and issuing such permit or license only to those who meet the prescribed standards and regulations, including, if not unreasonable, opportunity for inspection of the outlying production plants or establishments. (In re Blois, 179 Cal. 291 [176 P. 449]; 18 Cal.Jur., p. 804; Korth v. City of Portland, 123 Or. 180 [261 P. 895, 58 A.L.R. 665]; Sterett & Oberle Packing Co. v. City of Portland, 79 Or. 260 [154 P. 410]; State v. Nelson, 66 Minn. 166 [68 N.W. 1066, 61 Am.St.Rep. 399, 34 L.R.A. 318].) The plaintiff here, however, has not alleged any authorized regulatory power. By its allegations it bespeaks the exercise of the bare unauthorized power of regulation and inspection beyond its territorial limits. The plaintiff relies on In re Blois, supra, and Ebrite v. Crawford, 215 Cal. 724 [12 PaCal.2d 937], in support of its argument that the right of inspection of the outlying slaughter houses is indispensable to its governmental function of safeguarding the health of its citizens. The case of In re Blois, supra, is not inconsistent with the conclusion herein. It was there assumed that the city had the power to require inspection of laundries situate in another city as a condition precedent to granting a license to supply laundry services to inhabitants of the city. The court there was concerned with the question whether the rates charged for inspection of outside laundries operated by the applicant for the license were unreasonable and discriminatory. The case of Ebrite v. Crawford involved a municipal airport lying partly within and partly without the city limits and which the municipality had express legislative permission to acquire and govern. (Stats. 1927, p. 485.)
 [5] The authorities do not recognize extraterritorial regulation and inspection in itself as either necessary or indispensable to a governmental function in such cases. The decisions point to the obvious method of enforcing compliance with appropriate standards, viz., inspection at the city limits *643 or, where that is inadequate, the requirement for a permit or license, and compliance with prescribed regulations as a condition precedent to the issue thereof.
 On the record here presented the lack of the factor of either necessity or indispensability is further shown by the application of the provisions of the Agricultural Code. That code makes compulsory federal, state or municipal inspection of all establishments in the state operated for the purpose of slaughtering animals. (Stats. 1933, p. 60.) The sale of meat for food purposes within the state is prohibited unless it bears the "inspected and passed" stamp of either the federal, state or municipal inspection departments. (Sec. 305.) Recognition is extended to municipal inspection departments existing or to be inaugurated. (Sec. 302.) Upon the approval by the director of agriculture of an establishment operating under municipal inspection there may be added to the stamp in use in said establishment the words "Cal. approved", and such stamp is accorded the same recognition as "Cal. inspected and passed". (Sec. 303.) The act provides for a comprehensive program of inspection and regulation of slaughter houses outside the jurisdiction of any established municipal inspection department. It is not alleged nor contended that such state regulation and inspection is insufficient protection to the health and welfare of the inhabitants of the City of Oakland. Recognition of existing or future municipal inspection departments does not therefore necessarily include nor compel approval of inspection service performed by municipalities outside their territorial boundaries, even though such service presupposes requirements for standards equal to those prescribed by the Agricultural Code. If it did, the activities of the municipality would be resolved into a race to claim fees for inspection from every establishment outside of the city otherwise subject to inspection under the Agricultural Code which supplied any portion of its meat or meat products to inhabitants of the city.
 [6] The present action is appropriate as an action against an officer of the state to compel performance of a duty enjoined upon him by law. (Sec. 1085, Code Civ. Proc.; Nougues v. Douglass, 7 Cal. 65; U'Ren v. State Board of Control, 31 Cal.App. 6, 12 [159 P. 615]; 59 Cor. Jur., p. 312.) *644
 It follows, however, from the foregoing discussion, that the complaint does not state a cause of action and the demurrer should have been sustained.
 The judgment is reversed.
 Langdon, J., Seawell, J., Edmonds, J., Thompson, J., and Curtis, J., concurred.
