Plaintiff, Charter Township of Lyon, appeals as of right from a June 25, 1990, Oakland Circuit Court order denying its request for injunctive relief against defendants, junkyard owners Harry and Connie Lazechko.
On appeal, plaintiff contends that the trial court-erred in striking, ad hoc, the township’s three-hundred-foot-setback requirement that prohibits the use of property as a junkyard within three hundred feet of any residential district. Plaintiff asserts that the trial court erred in denying its request for an order enjoining defendants from utilizing that portion of their property that is located within three hundred feet of Griswold Road as a junkyard. We agree with plaintiff.
Granting injunctive relief is a matter committed to the discretion of the trial court. Jeffrey v Clinton Twp, 195 Mich App 260, 263-264; 489 NW2d 211 (1992); Ins Comm’r v Michigan State Accident Fund Advisory Bd, 173 Mich App 566, 578; 434 NW2d 433 (1988). Injunctive relief, an extraordinary remedy, is granted only when (1) justice requires it, (2) there is no adequate remedy at law, and (3) there exists a real and imminent danger of irreparable injury. Jeffrey, supra.
We hold that the trial court abused its discretion in refusing to enjoin the defendants’ encroachment.
We do not believe that the confusion engendered by the township commission’s apparent misapprehension of the applicability of its amended ordinance should have determined the outcome in this case of the question whether the three-hundred-foot setback, which existed from the defendant’s move on May 6, 1983, until the court’s order of April 24, 1990, was such an onerous imposition on the defendants as to "constitute abuse of the discretion of the zoning board.” The trial court erro*683neously implied that the defendants may use, i.e., have the right to use, the three-hundred-foot setback simply because it was not an expressly mandated perimeter in the ordinance. The 1983 ordinance provided in part:
The Planning Commission and Township Board may impose such conditions or limitations in granting approval as may, in its judgment, be necessary to fulfill the spirit and purpose of this ordinance.
Obviously, the township authorities later codified that a three-hundred-foot setback for such an undesirable use as a junkyard was appropriate and in fact compelling, but that action does not establish a corollary that a three-hundred-foot setback was inappropriate under the earlier ordinance. Certainly, the defendants consented to and acquiesced in a three-hundred-foot setback requirement as a condition of the board’s approval. They constructed a solid wood fence three hundred feet from Griswold Road, and at various times between 1983 and 1989, when they were ticketed for storing parts of junk vehicles in front of the fence, they satisfied the tickets and removed the offending parts.
The conflict between the competing interests of the parties should have been decided by resolving whether the three-hundred-foot setback requirement was unconstitutional as a condition in view of the fact that it had been agreed to by the parties, or at least acquiesced in by defendants for several years. The court overturned the status quo that had existed for five years, permitting the defendants to extend the junkyard use from their fence over an open space or greenbelt between residential dwellings without deciding the larger *684question whether the three-hundred-foot setback, if imposed as a condition precedent to the granting of the use, was a constitutional and proper exercise of the zoning authority of the township under its police power to regulate the health and welfare of the community.
According to the stipulated statement of facts, defendants, in their application, agreed to the three-hundred-foot setback and agreed to erect a fence thereon. They erected such a fence and largely abided by the setback requirement between 1983 and 1989. On October 10, 1988, they sought expansion and applied for a variance to permit them to extend the junk vehicle use into the three-hundred-foot setback area. The application was denied, but in 1989, defendants again encroached in the setback area. The township filed suit, and on September 20, 1989, the court entered a temporary injunction restraining defendants from use of the setback area. Ultimately, trial on the merits was set for April 24, 1990. On that date, the court heard arguments, the parties submitted briefs, exhibits, and the stipulated statement of facts, and the court’s order simply determined "that there is no immediate and irreparable harm” and then proceeded to set out site plan requirements, including fences and gates, with the admonition that if defendants failed to comply, their use "may be restricted.” The court did not strike down the ordinance, but in effect made an end run around it. Essentially, the court sanctioned a nonconforming use without the benefit of proceedings in the appropriate township planning department and zoning board and the appropriate local appellate mechanisms. This was beyond the court’s powers. A court of equity may not abrogate procedural due process. The court held as follows:
*685The Court finds that, in fact, that there is no immediate and irreparable harm and that, in fact, the use of the 300 feet should be allowed. That to do otherwise under these facts and circumstances would constitute abuse of the discretion of the Zoning Board and also the ordinance [sic].
However, the Court is mindful that the Township has a legitimate right to ensure the safety and welfare of its community.
Accordingly, it is the decision of this Court that the Defendants may use and have the right to use that 300 feet conditioned on the following. If they do not satisfy those conditions, they will be in violation of the order.
There follows three paragraphs of topographical, engineering, access, planning, and site restrictions. We are not enlightened with respect to the source of these engineering refinements, and we do not find the court’s inherent equity powers so extensive as to permit it to function as a judicial zoning appeal board. Farmington Twp v Scott, 374 Mich 536; 132 NW2d 607 (1965).
Reversed.
Corrigan, J., concurred.