
606 S.W.2d 411 (1980)
CITY OF KANSAS CITY, Missouri, Appellant,
v.
MARY DON COMPANY et al., Respondents.
No. WD 31192.
Missouri Court of Appeals, Western District.
September 2, 1980.
Motion for Rehearing and/or Transfer Denied October 1, 1980.
*412 Aaron A. Wilson, City Atty., James C. Bowers, Jr., Barbara A. Schenkenberg, William D. Geary, Asst. City Attys., Kansas City, for appellant.
James M. Thompson, Philip C. Ehli, Kansas City, for respondents.
Robert H. Freilich, Kansas City, for amicus curiae movants.
Before CLARK, P. J., and DIXON and SOMERVILLE, JJ.
Motion for Rehearing and/or Transfer to Supreme Court Denied October 1, 1980.
*413 SOMERVILLE, Judge.
The appellant in this case is the City of Kansas City, Missouri, a municipal corporation (City). The respondents are Mary Don Company, a Missouri corporation, and three individuals who comprise its officers and board of directors (collectively Mary Don).
The City filed a petition in the Circuit Court of Jackson County against Mary Don seeking injunctive relief. The trial court, pursuant to a motion to dismiss filed by Mary Don, dismissed the City's petition. Although Mary Don predicated its motion to dismiss on seven (7) alternate grounds, the order of the trial court dismissing the City's petition was wholly lacking in specificity as it merely recited that Mary Don's "Motion to Dismiss . . . is, by the court, sustained."
Reduction of the City's petition to its simplest terms justifies the following recapitulation: the City had duly enacted ordinances for the promotion of the health, safety, convenience, comfort, morals, prosperity and general welfare of the public, among which were ordinances governing construction and maintenance of residential buildings and premises, declaration and abatement of nuisances, littering, and control of weeds; the ordinances referred to consisted of Committee Substitute for Ordinance No. 25020, as amended, commonly called the Building Code, Chapter 20, Code of General Ordinances of Kansas City, Missouri (the Property Maintenance Code), Chapter 25, Code of General Ordinances of Kansas City, Missouri (Nuisances), Chapter 16, Code of General Ordinances, Article III (Littering), and Chapter 18, Code of General Ordinances, Article VIII (Weeds and Noxious Plants); Mary Don owned numerous residential, rental properties at various locations in the city upon which existed more than 103 violations of various ordinances heretofore listed; Mary Don failed to abate said violations after being given notice and an opportunity for a hearing; the substandard conditions on Mary Don's properties "are of long duration . . . constitute a severe blighting influence on the neighborhoods in which they exist . . . [and] depress values of surrounding properties"; specific facts were averred showing the location, type and nature of the claimed ordinance violations, which averments, liberally construed, also pleaded the maintenance of a public nuisance; the City, to no avail, had expended substantial amounts of time and money in an effort to obtain compliance by Mary Don with the requirements of said ordinances; the City had pursued its administrative and legal remedies against Mary Don to secure compliance with said ordinances, but Mary Don had failed and refused to abate said conditions and the City therefore was without an adequate remedy at law; the City's only alternative to injunctive relief is continuous, multiple prosecutions in the Municipal Court of Kansas City, Missouri, which lacks authority or jurisdiction to compel Mary Don to bring its properties into compliance with said ordinances; and the City prayed for a mandatory injunction ordering Mary Don to "abate the violations of City Ordinances existing upon their properties at the time of such injunction, and ordering them to refrain from future violations of the City's . . . ordinances upon their said properties", and further prayed "for such other and further relief as to the Court in the premises seems just . . . ."
As garnered from Mary Don's motion to dismiss and the briefs of the respective parties, the appeal may be summed up as revolving around three points, namely, (1) whether the City's petition failed to state a claim because the ordinances purportedly relied upon were not pleaded in haec verba or attached as exhibits to said petition, (2) whether the City by its petition was merely seeking to enjoin the violation of certain quasi-criminal ordinances-an area in which courts of equity have historically refused to entertain jurisdiction, and (3) whether the City had an adequate remedy at law since Mary Don could be prosecuted in municipal court for any alleged ordinance violations and, if found guilty, subjected to substantial penalties.
In reviewing on appeal whether the City's petition stated a cause of action this *414 court gives the petition its broadest intendment, accepts all facts averred therein as true, construes all averments liberally and favorably to the City and determines whether the averments invoked principles of substantive law upon which relief could be granted to the City. Concerned Parents v. Caruthersville Sch. D., 548 S.W.2d 554, 558 (Mo. banc 1977); Shapiro v. Columbia Un. Nat. Bk. & Tr. Co., 576 S.W.2d 310, 312 (Mo. banc 1978) cert. denied 444 U.S. 831, 100 S.Ct. 60, 62 L.Ed.2d 40 (1979); and Sutton v. Sutton, 567 S.W.2d 147, 147-48 (Mo.App.1978). The City's petition, although imperfectly or defectively stated, is not subject to dismissal if its allegations invoke substantive principles of law which may entitle the City to relief. Schnabel v. Taft Broadcasting Company, Inc., 525 S.W.2d 819, 821 (Mo.App.1975); and Ingalls v. Neufeld, 487 S.W.2d 52, 54 (Mo.App. 1972). Concomitantly, the City's general prayer for relief-"for such other and further relief as to the Court in the premises seems just"-brings into consideration the following principle enunciated in Cannon v. Bingman, 383 S.W.2d 169, 173 (Mo.App. 1964): "A general prayer for relief permits the balancing of all the equities which are within the scope of the pleadings and the evidence; for once rightfully in possession of a case the court will not relinquish it short of doing complete justice, so that there may be a full and complete determination of the rights and liabilities of the parties in respect to the controversy involved." See also In Re Marriage of Morriss, 573 S.W.2d 101, 103 (Mo.App.1978).
It is also important at the outset to take cognizance of what constitutes a public nuisance. For this purpose, attention is directed to the broad definition subscribed to in State ex rel. Collet v. Errington, 317 S.W.2d 326, 331 (Mo.1958), cert. denied 359 U.S. 992, 79 S.Ct. 1122, 3 L.Ed.2d 980 (1959): "`A public or common nuisance is an offense against the public order and economy of the state by unlawfully doing any act or by omitting to perform any duty which the common good, public decency, or morals, or the public right to life, health, and the use of property requires, and which at the same time annoys, injures, endangers, renders insecure, interferes with, or obstructs the rights or property of the whole community, or neighborhood, or of any considerable number of persons, even though the extent of the annoyance, injury or damage may be unequal or may vary in its effect upon individuals.'"
Whether the City's petition failed to state a claim because the ordinances alleged therein were inadequately pleaded is posed by the respective briefs in a rather imprecise and convoluted manner. In terms of the argument advanced by Mary Don, if correctly perceived by this court, the first issue may be summed up as follows: Since the trial court could not take judicial notice of the contents of the city ordinances in question it necessarily follows that it was impossible for the trial court to determine from the face of the city's petition whether the factual averments describing existing conditions on Mary Don's various properties did or did not constitute violations of the various ordinances relied upon by the City. Concededly, Mary Don's argument on appeal brings into focus the well established principle that courts may not take judicial notice of city ordinances. General Motors v. Fair Employment, Etc., 574 S.W.2d 394, 400 (Mo. banc 1978); and Queen of Diamonds, Inc. v. Quinn, 569 S.W.2d 317, 319 (Mo.App.1978). Assuming, arguendo, that Mary Don's argument has merit when viewed in the narrow context in which it is advanced, the City's petition nevertheless was not fatally stamped with failure to state a claim. When given its broadest intendment and all averments therein are liberally construed most favorably to the City, many of the factual averments re existing ordinance violations in connection with Mary Don's various properties vis-a-vis the broad definition of a public nuisance contained in State ex rel. Collet v. Errington, supra, also substantively pleaded the maintenance of a public nuisance. Collaterally, the general prayer for relief contained in the City's petition was elastic enough to encompass injunctive relief for maintenance of a public nuisance by Mary Don. Cannon v. Bingman, supra.
*415 The remaining points upon which disposition of this appeal pivots-whether equity will enjoin the violation of quasi-criminal ordinances and whether the City had an adequate remedy at law-lend themselves to being jointly treated for purposes of discussion and disposition. It is true, generally speaking, that a court of equity will not permit itself to be used as a medium for the enforcement of criminal laws or quasi-criminal ordinances. Kansas City Gunning Advertising Co. v. Kansas City, 240 Mo. 659, 676, 144 S.W. 1099, 1103 (1912). State ex rel. Chicago, B & Q R. Co. v. Woolfolk, 269 Mo. 389, 190 S.W. 877, 878 (banc 1916); and Shelton v. Lentz, 191 Mo. App. 699, 705, 178 S.W. 243, 244 (1915). However, a court of equity is not divested of jurisdiction to enjoin the maintenance of a public nuisance simply by reason of the fact that maintenance of the public nuisance also constitutes a violation of certain criminal or quasi-criminal statutes or ordinances. In Kansas City Gunning Advertising Co. v. Kansas City, supra, and City of Washington v. Mueller, 218 S.W.2d 801 (Mo. App.1949), this exception was judicially recognized although the particular acts or conduct respectively involved were found not to constitute a public nuisance. As stated in Kansas City Gunning Advertising Co., supra, 144 S.W. at 1103, "[t]he jurisdiction of equity to prevent irreparable injury to property is not divested by the fact that the act to be enjoined may also be a violation of the criminal law, neither does a court of equity lack power to enjoin the continuance of a public nuisance." As stated in City of Washington, supra, 218 S.W.2d at 803, "[i]t cannot be questioned that the city may suppress and abate nuisances which are a menace to public health. [a]nd it is not even a debatable question that injunction is a proper remedy for the abatement of a public nuisance, and this is true even though the party creating or continuing the public nuisance may also be liable to prosecution under the state or city laws." More directly in point is the case of City of St. Louis v. Friedman, 216 S.W.2d 475, 479 (Mo.1949). There, the court, in affirming a judgment entered by the trial court enjoining defendant's use of her property in violation of the city's zoning ordinance, held as follows: "We overrule appellant's contention that injunction is not the proper remedy because the ordinance provides for enforcement by fine. The proceeding is not a prosecution for crime. It is more in the nature of a civil action for the abatement of a continuing nuisance and is within the jurisdiction of a court of equity."
Judicial recognition that courts of equity have jurisdiction to enjoin public nuisances even though the parties maintaining them may also be liable to prosecution under criminal or quasi-criminal statutes or ordinances is rooted in sound logic and common sense. Under circumstances such as those at hand, it is inherent that the overriding and primary purpose of the relief sought by the City was protection of the health, safety and welfare of the public, and in this frame of reference the fact that such relief might indirectly constitute enforcement of certain quasi-criminal ordinances is merely incidental. The City alleged in its petition that notwithstanding pursuit of its administrative and legal remedies against Mary Don, the latter has failed and refused to abate the rampant conditions existing on the various properties which it owns; moreover, repeated citations of Mary Don had no effect in deterring its persistent, illegal conduct. Surely the City should not be rendered impotent to seek injunctive relief to protect the health, safety and welfare of its citizenry from ordinance violations when the supporting factual averments also lend themselves to being construed as pleading the maintenance of a public nuisance. Saying that prosecution of Mary Don time and time again and its repeated subjection to the payment of fines is an adequate remedy has a hollow ring when weighed with the public interest. Equity looks to substance rather than form and where, as here, it is pleaded that efforts of the City through administrative and legal channels to eradicate conditions menacing public health, safety and welfare are effectively thwarted, the principal purpose *416 of the City's petition should be broadly viewed as seeking abatement of a public nuisance as opposed to being narrowly viewed as nothing more than an attempt to enforce certain quasi-criminal ordinances.[1] As disclosed by the City's petition numerous prosecutions and the levying of repeated penalties are highly problematical as effective deterrents to Mary Don's continuing, broad scale, illegal conduct. So long as Mary Don's conduct persists and the complained of conditions stand unabated, the public, for all practical purposes, remains helplessly victimized.
The City may subsequently see fit to ask leave of the trial court to amend its petition and plead the ordinances relied upon in haec verba or attach copies thereto as exhibits. Nevertheless, the City's petition as it presently stands, when given its broadest intendment and construed liberally and most favorably to the City, stated, albeit somewhat imperfectly, a cause of action. The parties are cautioned that the court's opinion herein is posited on the narrow ground that the City's petition, apart from consideration of the contents and provisions of any ordinances, facially stated a cause of action.
Judgment reversed and cause remanded.
All concur.
NOTES
[1]  This case is factually distinguishable from the case of City of Independence v. Dewitt, 550 S.W.2d 840 (Mo.App.1977), in that here the City pleaded that it had pursued its administrative and legal remedies to no avail and the underlying facts pleaded as constituting ordinance violations, when liberally construed, may also be deemed to plead the maintenance of a public nuisance.
