
539 N.W.2d 184 (1995)
William and Terri GRAVERT, Appellees,
v.
Max and Ruth NEBERGALL, Appellants.
No. 94-1153.
Supreme Court of Iowa.
October 25, 1995.
*185 Wythe Willey of Wythe Willey Law Office, Cedar Rapids, for appellant.
Steven B. Joy of Kudart-Joy Law Offices, Mechanicsville, for appellee.
Considered by HARRIS, P.J., and CARTER, NEUMAN, SNELL, and TERNUS, JJ.
HARRIS, Justice.
The trial court concluded that Iowa Code chapter 359A (1995) (fence viewing statute) is unconstitutional as applied to the plaintiffs in this case. The court also concluded the chapter was preempted by Iowa Code section 364.1 (home rule for cities). Because we disagree with these conclusions we reverse and remand.
This dispute is between adjoining Cedar County landowners. Plaintiffs Graverts own twelve acres of land, all located within the city limits of Tipton. Three acres are used as a residence and nine acres are leased out for crop farming. Tipton is located within the boundaries of Center Township in Cedar County. The Nebergalls own twenty-five acres of land located outside the city limits of Tipton but within Center Township. The land is used by them for the raising of miniature horses. A fence had formerly been located upon the property line between the parties, which is also the dividing line between the City of Tipton and rural Center Township. Tipton has ordinances restricting livestock and fencing within the city limits. These ordinances of course do not apply to land located in rural Center Township.
A controversy arose between the parties concerning the construction and maintenance of a partition fence, and, at the request of the Nebergalls, the Center Township trustees, sitting as fence viewers, held a hearing to resolve it. Pursuant to Iowa Code chapter 359A, the trustees entered an order requiring the Graverts to maintain the 344.1 feet of fencing running north-south, and the Nebergalls to maintain the 494.7 feet of fence running east-west. At first blush this would appear to be a routine order within the power of fence viewers when establishing a partition *186 fence under the authority provided by Iowa Code chapter 359A.
Believing such authority was lacking in this controversy, however, the Graverts appealed the fence-viewers' decision to the district court. Both parties stipulated to the facts and both filed motions for summary judgment. The district court entered a ruling granting the Graverts' motion. Although the court found the fence-viewing statute was generally a valid exercise of police power where raising of livestock on adjoining property is authorized, it held the statute was unconstitutional as applied to the Graverts. The court reasoned:
[A] partition fence between abutting landowners, one rural and suited or used for the raising of livestock and the other city and prohibited from such use, confers no benefit to the latter and provides the former with a specific benefit unrelated to any legitimate governmental interest, particularly in light of the underlying obligation of the livestock raiser to protect the general public from his animals.
The court then concluded that, as applied to the Graverts, Code chapter 359A violates the Fifth and Fourteenth Amendments of the United States Constitution as well as sections 1 and 6 of article I of the Iowa Constitution. The court also ruled that, even if the statute was constitutional as applied to the Graverts, it is preempted by Iowa Code section 364.1 and cannot be enforced against them.
The Nebergalls appeal from this judgment. A case from a fence-viewer's decision is triable as a law action. Moore v. Short, 227 Iowa 380, 381, 288 N.W. 407, 408 (1939). We review the case for correction of errors of law. Iowa R.App.P. 4.
I. Statutes regulating the construction, apportionment, and maintenance of a partition or a division fence are enacted by the legislature in the exercise of its police powers. 35 Am.Jur.2d Fences § 10 (1967); 36A C.J.S. Fences § 8 (1961). Police power refers to the legislature's broad, inherent power to pass laws that promote the public health, safety, and welfare. State v. Hartog, 440 N.W.2d 852, 856 (Iowa 1989), cert. denied, 493 U.S. 1005, 110 S.Ct. 569, 107 L.Ed.2d 563 (1990). The exercise of a state's police power invokes consideration of eminent domain, due process, and equal protection. Laws enacted by the exercise of a state's police power are presumed to be constitutional provided there is some reasonable relation to the public welfare, and one challenging the validity of such laws can rebut this presumption only by negating every reasonable basis upon which the laws may be sustained. Hartog, 440 N.W.2d at 857. In other words the challenger must demonstrate that the law is unreasonable, arbitrary, and capricious. See Green v. Shama, 217 N.W.2d 547, 554 (Iowa 1974).
The courts accord legislatures a highly deferential standard of review, although of course the legislature must stay within certain parameters when exercising the state's police power. Hartog, 440 N.W.2d at 857. These parameters were explained this way in Lawton v. Steele:
[T]he state may interfere wherever the public interests demand it, and in this particular a large discretion is necessarily vested in the legislature to determine, not only what the interests of the public require, but what measures are necessary for the protection of such interests. To justify the state in thus interposing its authority in behalf of the public, it must appear, first, that the interests of the public generally, as distinguished from those of a particular class, require such interference; and, second, that the means are reasonably necessary for the accomplishment of the purpose, and not unduly oppressive upon individuals.
152 U.S. 133, 136-37, 14 S.Ct. 499, 501, 38 L.Ed. 385, 388 (1894) (citation omitted).
Iowa fencing statutes date from our earliest times, even predating the Iowa Code of 1851. Fence viewers were authorized by our territorial legislature. See Revised Statutes of the Territory of Iowa (1843), ch. 150. Our present fence-viewing code chapter, Iowa Code ch. 359A, is derived from Iowa Code chapter 52 (1851). It is difficult to imagine a more deeply rooted Iowa statutory provision.
At common law landowners had a duty to fence in their livestock and restrain it from *187 running at large, or face strict liability to others for injuries or property damage caused by trespassing animals. Wagner v. Bissell, 3 Iowa 396, 401 (1856). In Iowa and other western states, however, the importance of grazing led most legislatures or courts to reverse the common law and require landowners to fence out animals by means of a lawful fence before they could collect damages for animal trespass. See id. at 402-09; Note, The Iowa Fencing Laws, 7 Iowa L.Bull. 176, 177 (1922).
Until recently Iowa law struck a middle ground, following a fence-in theory and a conditional fence-out theory. Iowa Code section 169B.2 (1993) required that "animals shall be restrained by the owners thereof from running at large." Recovery for damages resulting from an animal running at large, however, was limited to situations where the animal trespassed "upon land, fenced as provided by law...." Iowa Code § 169B.3. Such a landowner could distrain a trespassing animal to recover damages caused by the trespass "unless it escaped from adjoining land in consequence of the neglect of such landowner to maintain the landowner's part of a lawful partition fence" pursuant to Iowa Code chapter 359A. Iowa Code § 169B.3. Iowa Code chapter 169B was repealed by the legislature in 1994. 94 Iowa Acts, ch. 1173, § 42(1).
The primary purpose of Iowa's partition fence law, then, has been to prevent livestock from running at large and causing damage on another person's land. David S. Steward, Note, Iowa Agricultural Fence Law: Good Fences Make Good Neighbors, 43 Drake L.Rev. 709, 722 (1995). This raises questions under the first prong of the Lawton test, which prohibits the state from imposing its police power to benefit a particular class of persons as opposed to the public generally. We however think it is clear that the law serves the broader purpose of mediating boundary, fence, and trespass disputes by requiring adjoining landowners to share the cost of a partition fence. Courts have generally upheld fencing laws against various constitutional objections as a valid exercise of police power. 35 Am.Jur.2d Fences § 10 (1967); 36A C.J.S. Fences § 8 (1961); Annotation, Constitutionality of Fencing and Stock Laws, 6 A.L.R. 212 (1920) (supplemental annotation at 18 A.L.R. 67 (1922)). We think Iowa's fence-viewing statute is constitutional on its face, a conclusion with which the trial court did not disagree.
II. The question then becomes whether, especially in view of Iowa's changing economic and social structure, the fence-viewer's statute is constitutional as applied to the Graverts. When the fence-viewing statute was first enacted, Iowa was nearly exclusively a farming state. Although farming remains a dominant aspect of our lives, it now shares its importance with other economic, social and cultural activities, and it is contended this changing structure has caused a once valid exercise of police power to become unconstitutionally oppressive. Holdings from other states assist us in addressing this issue.
Other courts have found statutes similar to Iowa's to be unconstitutionally applied, believing no valid public purpose is served by requiring one landowner who has no interest in livestock to share the cost of a fence for the benefit of a neighbor who does. Sweeney v. Murphy, 39 A.D.2d 306, 334 N.Y.S.2d 239, 241 (1972), aff'd, 31 N.Y.2d 1042, 342 N.Y.S.2d 70, 294 N.E.2d 855 (1973); Choquette v. Perrault, 153 Vt. 45, 569 A.2d 455, 460 (1989). Two Ohio courts reached a contrary conclusion, noting that the owner without livestock derived benefit in the form of protection from encroaching livestock. Glass v. Dryden, 18 Ohio St.2d 149, 248 N.E.2d 54, 56-57 (1969); Kloeppel v. Putnam, 76 Ohio App. 130, 63 N.E.2d 237, 239 (1945).
The Glass court noted the similarity between the fence law and any special assessment to pay for an improvement that benefits the public. Conceding that "a partition fence is not a public improvement in the sense that the public uses it directly," the court reasoned to the extent
the annoyance and inevitable trespassing upon adjoining fields and crops which would result from the absence of a fence is prevented, the fence inures to "the ulterior public advantage." And, to the extent that the advantage inures to private property immediately adjacent to the fence, some *188 benefit thereto may be presumed until the contrary is shown.
248 N.E.2d at 56. Finding the plaintiff failed to rebut this presumption with sufficient evidence, the court found for the defendant and denied the injunction. Id. at 57.
We are persuaded by the view of the Ohio court, and do not see our fence statute as an exercise of police power to benefit only a particular class. Iowa Code chapter 359A applies equally to all adjoining landowners, without regard to the use of the land. See Sinnott v. District Court, 201 Iowa 292, 296, 207 N.W. 129, 131 (1926); Mitchell v. Graver, 158 Iowa 188, 190-91, 139 N.W. 460, 461 (1913). Even if we assume nearby livestock owners are the primary beneficiaries under the statute, a law may serve the public purpose although it benefits certain individuals or classes more than others. John R. Grubb, Inc. v. Iowa Hous. Fin. Auth., 255 N.W.2d 89, 95 (Iowa 1977) (citing Richards v. City of Muscatine, 237 N.W.2d 48, 60 (Iowa 1975)). We thus conclude there is no violation under the first prong of Lawton.
The Graverts also attack chapter 359A on the claim that compliance with the order of the fence viewers requires them to expend substantial sums of money to maintain and repair a fence from which they derive no benefit. This raises questions under the second prong of Lawton, which prohibits statutes that are unduly oppressive to individuals. Although the Graverts produce no evidence regarding the cost of compliance with the fence-viewers' decision, we do not rest our decision on this failure. A law does not become unconstitutional because it works a hardship. Woodbury County Soil Conservation Dist. v. Ortner, 279 N.W.2d 276, 279 (Iowa 1979) (citing Chicago Title Ins. Co. v. Huff, 256 N.W.2d 17, 25 (Iowa 1977)). Indeed the fact that one must make substantial expenditures to comply with regulatory statutes does not raise constitutional barriers. Id. (citing Northwestern Laundry v. City of Des Moines, 239 U.S. 486, 491-92, 36 S.Ct. 206, 208-09, 60 L.Ed. 396, 400-01 (1916)).
We note that several of the benefits identified by the trial court in Choquette are present here as well:
(1) freedom from unwanted intrusion by a neighbor's livestock; (2) freedom from trespassing neighbors and increase in privacy; (3) elimination of "devil's lanes," unoccupied spaces between separate fences constructed by hostile neighbors; (4) diminution of lawsuits arising out of damage caused by straying cows; (5) discouragement of litigation by clearly marking the boundaries of rural lands; (6) increase in value of all land by fostering the continued validity of agriculture.
569 A.2d at 457-58. For example the Graverts benefit from the partition fence because it protects their crops from denigration by the defendants' miniature horses. We have already noted the repeal of Iowa Code chapter 169B (1993) with its provision for recovery of damages caused by trespassing animals.
We believe the Graverts have not shown the fence statute to be unduly oppressive and therefore hold it also passes constitutional muster under the second prong in Lawton. Whatever unfairness the Graverts see in the fence law is of political, not constitutional, dimensions. It is for the legislature and not for the courts to pass upon the policy, wisdom, advisability, or justice of a statute. See Hines v. Illinois Cent. Gulf R.R., 330 N.W.2d 284, 289 (Iowa 1983).
III. As mentioned, the trial court reached a "fall back" conclusion, holding the authority granted fence viewers under Code chapter 359A is preempted by Code section 364.1, the home-rule statute for cities. Although they do not cite it, the same contention can be urged under the more fundamental grant of home rule for cities under article III, section 38A of the Iowa Constitution. Under both the statute and constitutional provisions, cities are granted the power to regulate matters of local concern, subject to preemption by state statute. City of Des Moines v. Gruen, 457 N.W.2d 340, 341 (Iowa 1990).
We recently reviewed the development of home rule in Iowa in Polk County Board of Supervisors v. Charter Commission, 522 N.W.2d 783, 790-91 (Iowa 1994), and again in City of Clinton v. Sheridan, 530 N.W.2d 690, 692-93 (Iowa 1995). These *189 cases make it clear that both the statute and constitutional grants of home rule power are carefully qualified so as to withhold the grant of power where it conflicts with state statute. The power of home rule thus must always yield to a state statute with which it conflicts. Because home rule power cannot exist in conflict with a state statute, we fail to see how the general grant of home rule power can preempt a specific statutory provision. We thus hold that Iowa Code chapter 359A was not preempted by the grant of home rule to cities.
IV. We have not discussed the parties' factual dispute as to whether the Graverts are free under city ordinances to use their twelve acres for agricultural purposes. The omission was deliberate; we believe the rights and responsibilities under Code chapter 359A are not affected by the fact that one of the adjoining landowners does not or cannot conduct a farming operation.
The judgment of the trial court is reversed and the case is remanded for disposition in accordance with this opinion.
REVERSED AND REMANDED.
