
69 S.W.3d 126 (2002)
Gwenetha GLENN, Ray Christiansen, Zeb Harker, Dallas Ruth, Verdon Fletchall, Appellants,
v.
CITY OF GRANT CITY, Missouri, A Political Subdivision, Board of Adjustment of City of Grant City, Missouri, Charles L. Downey, Mayor, Cathy James, Council Member, Deborah Roach, Council Member, Andy Thurman, Council Member, Jeff Andrews, Council Member, Respondents.
No. WD 59807.
Missouri Court of Appeals, Western District.
February 26, 2002.
*128 Jerold L. Drake, Grant City, for appellants.
David B. Parman, Grant City, for respondents.
Before JAMES M. SMART, JR., Presiding Judge, HAROLD L. LOWENSTEIN, Judge and JOSEPH M. ELLIS, Judge.
JOSEPH M. ELLIS, Judge.
Appellants are five residents of Grant City, Missouri, who keep livestock on their property. Respondents are the City of Grant City, the Mayor, Council members, and Board of Adjustment of Grant City (hereafter jointly referred to as "the City"). Appellants filed suit against the respondents and in their first amended petition sought an injunction to prevent the City from seizing their livestock pursuant to a city ordinance. The City filed a motion to dismiss for failure to state a claim upon which relief could be granted. The Circuit Court of Worth County sustained the City's motion. This appeal follows.
We will only sustain the grant of a motion to dismiss for failure to state a claim if the petitioner "`fails to allege facts essential to a recovery.'" Hayward v. City of Independence, 967 S.W.2d 650, 653 (Mo.App. W.D.1998) (quoting Klemme v. Best, 941 S.W.2d 493, 495 (Mo. banc 1997)). In reviewing the adequacy of the petition, "we assume that all of plaintiff's averments are true, and liberally grant plaintiff all reasonable inferences therefrom." Coomes v. Slater Dev. Corp., 36 S.W.3d 412, 414 (Mo.App. W.D.2001). "The petition is reviewed in an almost academic manner, to determine if the facts alleged meet the elements of a recognized cause of action, or of a cause that might be adopted in that case, and no attempt is made to weigh any facts alleged as to whether they are credible or persuasive." Id. If a petition asserts any set of facts which, if proved, would entitle the plaintiff to relief, it should not be dismissed for failure to state a claim. Martin v. City of Washington, 848 S.W.2d 487, 489 (Mo. banc 1993).
With this standard in mind, we review the allegations in Appellants' first amended petition. The amended petition alleges, inter alia, that on July 12, 2000, the City adopted Ordinance No. 3528 ("the Ordinance"), which places restrictions on the keeping of animals in the City. The Ordinance is divided into ten sections. It requires *129 residents to keep animals in sanitary enclosures, alleviate any "ill-smelling, nauseous or obnoxious" odors created by their animals, and prevent animals from defecating on the property of others. In addition, animal owners must prevent their livestock from running at large. The Ordinance further prohibits residents from keeping livestock on land that is not zoned agricultural, providing in pertinent part:
(a) Except for dogs, cats and non-domestic animals which are otherwise provided for in this Code, and traditional household pets such as caged birds, similar caged animals and aquarium animals, no person shall keep, raise, harbor, water or offer for sale any cattle, cow, bull, hog, horse, mule, jennet pony, donkey, sheep, pig, goat, chicken, goose, duck, turkey, rabbit, skunk, raccoon or any other domestic or wild animal or fowl within the city, unless such animal or fowl are kept in an area zoned agricultural, or an area adjoining an area zoned agricultural, even if across a public roadway therefrom, and then, only if a permit is first obtained as hereinafter provided and such animal is enclosed on a tract of land of one acre(s) or more in size.
The enforcement provisions of the Ordinance authorize representatives of the City to enter upon an alleged violator's land, seize and impound the animals and, if impoundment fees are not paid within 10 days, to sell the animals to recoup such fees.
The first amended petition went on to allege that on October 4, 2000, the City mailed a letter to each of the appellants stating that they were in violation of the ordinance. The letters stated in relevant part:
You are hereby notified that if you do not bring this property into compliance with the city animal ordinance, by removal of the animals, on or before November 4, 2000, that we will cause the animals to be impounded and held for 10 days, during which time we will again attempt to notify you. If you do not claim the animals by payment of impoundment fees and care of the animals within 10 days of impoundment, the animals will be sold to recoup those costs.
Appellants further alleged that each of them owned real estate within the City, that they owned livestock that was kept on such real estate, and that livestock had been "lawfully kept on the subject property for over 70 years prior to the passing of any" zoning ordinance by the City, and for more than 100 years before passage of the subject ordinance. The first amended petition also asserted that the threatened action of the City would constitute an intentional trespass, would effect a taking of property without due process of law in violation of the Fifth and Fourteenth Amendments to the United States Constitution (and presumably Article I, § 26 of the Missouri Constitution), and that the taking would violate 42 U.S.C. § 1983 in that it would involve "state action." The petition concluded with allegations that, unless restrained, the City's unlawful entry upon Appellants' real estate and unlawful taking of their livestock would result in immediate and irreparable injury, loss and damage to appellants. The prayer was to enjoin the City from entering upon Appellants' property and taking possession of and selling Appellants' livestock.
In their only point, Appellants argue that their first amended petition sufficiently alleged facts entitling them to injunctive relief and that the trial court erred in dismissing their petition.
Injunctive relief is available to prevent irreparable injury to a property right resulting from enforcement of an unconstitutional or invalid ordinance. State *130 ex rel. Helujon, Ltd. v. Jefferson County, 964 S.W.2d 531, 537 (Mo.App. E.D.1998). "The primary purpose of an injunction is to maintain the status quo and prevent irreparable injury." Walker v. Hanke, 992 S.W.2d 925, 933 (Mo.App. W.D.1999). To show entitlement to injunctive relief, a petition must plead facts that show (1) the plaintiff has no adequate remedy at law, and (2) irreparable harm will result if the relief is not granted. Id. Generally, the phrase "adequate remedy at law" means "that damages will not adequately compensate the plaintiff for the injury or threatened injury." Id. "Irreparable harm is established if monetary remedies cannot provide adequate compensation for improper conduct." Id.
In the case at bar, Appellants alleged that each of them owned real estate within Grant City on which livestock had been kept for more than 100 years prior to the City's adoption of Ordinance No. 3528 on July 12, 2000. Appellants generally alleged that "all zoning and ordinances" must exempt from immediate operation all existing "nonconforming" uses, that maintenance of livestock on their real estate pre-dated adoption of the Ordinance, and that the Ordinance did not exempt their real estate or livestock from its operation. Appellants further asserted that enforcement of the Ordinance would result in unlawful entry upon their property and an unlawful taking of their livestock. Their petition also alleged that the City had threatened immediate enforcement against each of them by letter dated October 4, 2000, and that the City's threatened action would cause irreparable injury. Appellants claim these allegations were sufficient to survive the City's motion to dismiss for failure to state a claim upon which relief could be granted.
The City argues, however, that Appellants' contention that "all zoning and ordinances" must exempt nonconforming uses is a misstatement of Missouri law, because only zoning ordinances must exempt nonconforming uses. In addition, the City argues that Appellants failed to allege that the ordinance was a zoning ordinance. The City asserts that this failure is fatal to Appellants' claim because, according to the City, only zoning ordinances must exempt nonconforming uses. Finally, the City claims that, even if Appellants had claimed that the ordinance was a zoning ordinance, they would be incorrect, because the ordinance is actually a "non-zoning" ordinance.
The parties spend much time and effort arguing about whether the Ordinance is a "zoning" or "non-zoning" ordinance. The thrust of their debate, however, results from a misconception that only zoning ordinances can result in a taking of property without just compensation. But such is not the case. A regulatory taking can result from the imposition of an invalid regulation. Clay County ex rel. County Comm'n of Clay County v. Harley and Susie Bogue, Inc., 988 S.W.2d 102, 106 (Mo.App. W.D.1999).
"A regulatory taking occurs when a regulation enacted under the police power of the government goes too far." Id. There are no "set formulas" for determining when a taking occurs; courts generally make those decisions on a case-by-case basis. Id. The United States Supreme Court has determined that a property owner is entitled to compensation for a regulatory taking in two scenarios without a case-specific inquiry. Id. "These two situations are (1) when a regulation causes an actual physical invasion of property; and (2) when a regulation denies `all economically beneficial or productive use of land.'" Id. at 107 (quoting Lucas v. South Carolina Coastal Council, 505 U.S. 1003, 1015, 112 S.Ct. 2886, 2893, 120 L.Ed.2d 798 (1992)). If the government's action does *131 not fall into one of the per se categories, a factual inquiry into the specific facts of the case is necessary. Id. Missouri courts use the same factors followed by the United States Supreme Court in determining whether a taking has occurred. Id. Those factors are "`(1) the economic impact of the regulation; (2) the extent to which the regulation has interfered with distinct investment-backed expectations; and (3) the character of the government action.'" Id. (quoting Schnuck Markets, Inc. v. City of Bridgeton, 895 S.W.2d 163, 168 (Mo.App. E.D.1995)). Missouri courts have "also adopted the United States Supreme Court's standard that a compensable taking occurs when the regulation does not `substantially advance a legitimate state interest.'" Id. (quoting Harris v. Missouri Dept. of Conservation, 755 S.W.2d 726, 730 (Mo.App. W.D.1988)).
Our courts have applied the takings analysis in cases involving non-zoning, as well as zoning, ordinances and have even extended the rationale protecting non-conforming uses beyond its traditional application to zoning cases. For example, in Olympic Drive-In Theatre, Inc. v. City of Pagedale, 441 S.W.2d 5 (Mo.1969), a municipality enacted four ordinances, one of which amended the drive-in ordinance by requiring that the screen not be visible from any public highway or street or that the business owner provide a wall so that the screen could not be viewed from a public street. Id. at 7-8. The record revealed that the business owner had built his theater to comply with city ordinances, had operated his business lawfully for four years, and that it would have cost more than $200,000 for the owner to come into compliance with the ordinance. Id. at 9. The court found that the owner had a vested right to continue his business and compared the business owner's rights to continue operating his business to "the attempted termination of a pre-existing lawful nonconforming use of property, which the zoning cases have held to be an unconstitutional taking of private property without due process of law and a deprivation of prior vested property rights." Id. at 9. As a result, the Court found that the municipality's ordinance arbitrarily deprived the property owner of a vested property right to operate an existing, lawful business through a "police power" ordinance. Id. at 10.
Similarly, our zoning cases have frequently recognized that an unconstitutional taking would occur if a municipality were permitted to terminate a pre-existing lawful non-conforming use of land. Indeed, in Hoffmann v. Kinealy, 389 S.W.2d 745 (Mo. banc 1965), our Supreme Court noted that Missouri courts have generally "recognized and conceded that termination of pre-existing lawful nonconforming uses would be unconstitutional." Id. at 748. The Court in Hoffmann went on to expressly so hold, stating:
In our view of the matter, termination of relators' pre-existing lawful nonconforming use of their lots ... would constitute the taking of private property for public use without just compensation in violation of Article 1, Section 26, Missouri Constitution of 1945-a taking not to be justified as an exercise of the police power which is always subject to, and may never transcend, constitutional rights and limitations.
Id. at 754-55.
From the foregoing, it is apparent that it is irrelevant whether the Ordinance is a "zoning" or "non-zoning" ordinance. In either case, the question is whether the City's Ordinance is a valid exercise of its police power. An appropriate exercise of a municipality's police power does not offend the constitution even though such actions may interfere with an *132 individual's rights. State ex rel. City of Macon v. Belt, 561 S.W.2d 117, 118 (Mo. banc 1978); Bellerive Inv. Co. v. Kansas City, 321 Mo. 969, 13 S.W.2d 628, 640 (1929). The test of the validity of the exercise of the police power is always reasonableness. Missouri Dental Bd. v. Alexander, 628 S.W.2d 646, 650 (Mo. banc 1982) (quoting Caesar's Health Club v. St. Louis County, 565 S.W.2d 783, 786 (Mo. App. E.D.1978)). Based on the allegations of the petition in this case, it cannot be said that the Ordinance in question is a proper exercise of the City's police power.
Nonetheless, while continuing to develop its argument that the Ordinance is not a zoning ordinance, the City cites City of Kansas City v. Tayler, 689 S.W.2d 645 (Mo.App. W.D.1985), in support of its contention that the Ordinance here in question does not involve a taking. In Tayler, the ordinance prohibited residents from pasturing livestock within 200 feet of the nearest portion of a neighbor's residence. Id. at 646. A resident attempted to argue that the ordinance resulted in a taking of the portion of his land within 200 feet of his neighbor's house. Id. The court found that the ordinance was valid under the City's police power and did not constitute a taking. Id. at 647. "It has long been settled in this state that the valid exercise of the police power is not a taking of private property for public use." Id. at 646-47.
Tayler provides no support for the City, at least at this stage of the proceedings where we are addressing the dismissal of Appellants' petition for failure to state a claim upon which relief can be granted. Unlike the Ordinance in the case sub judice, the Tayler ordinance did not deprive residents of the right to keep animals on their property, but only prohibited landowners from pasturing livestock within 200 feet of a neighboring residence. Id. at 646. The ordinance in the case at bar is much different and much broader than the one in Tayler. Here, as alleged in the petition, as the City has threatened to apply the Ordinance to Appellants, it would permit the City to enter upon Appellants' property without consent and would deprive Appellants not only of their right to keep livestock, but would also result in a taking of their livestock without just compensation. Moreover, in light of the allegations of the petition, on the record before us, we have no basis to properly evaluate whether the Ordinance is a proper exercise of the police power.[1]
*133 The trial court erred in sustaining the City's motion to dismiss Appellants petition for failure to state a claim upon which relief can be granted. The judgment is reversed, and the cause is remanded to the trial court for further proceedings not inconsistent with this opinion.
All concur.
NOTES
[1]  We emphasize that this is an appeal from the dismissal of the petition for failure to state a claim upon which relief can be granted. Accordingly, our review is based solely on the allegations of the petition. We caution that this opinion should not be read as holding that a city cannot exercise its police power if a taking of property results therefrom. Clearly, such is not the case. As noted in Tayler, supra, "[i]t has long been settled in this state that the valid exercise of the police power is not a taking of private property for public use." Tayler, 689 S.W.2d at 646-47. Our Supreme Court has stated it thusly:

It has been definitely and clearly established and settled, by the decisions of this court and of the federal Supreme Court, that a statute, or a municipal ordinance, which is fairly referable to the police power of the State or municipality, and which discloses upon its face, or which may be shown aliunde, to have been enacted for the protection, and in furtherance, of the peace, comfort, safety, health, morality, and general welfare of the inhabitants of the State or municipality, does not contravene or infringe... the state and federal Constitutions..., and cannot be held invalid as wrongfully depriving the appellants of any right or privilege guaranteed by the Constitution, state or federal; the reason and basis underlying such decisions being that the personal and property rights of the individual are subservient and subordinate to the general welfare of society, and of the community at large, and that a statute or ordinance which is fairly referable to the police power has for its object, the "greatest good of the greatest number."
State ex rel. City of Macon v. Belt, 561 S.W.2d 117, 118 (Mo. banc 1978) (quoting Bellerive Inv. Co. v. Kansas City, 321 Mo. 969, 13 S.W.2d 628, 634 (1929)). Thus, it may well be that after responsive pleadings have been filed and discovery conducted, the Ordinance here in issue may be found to be an entirely appropriate exercise of the City's police power. We hold only that it was error to dismiss the petition for failure to state a claim.
