Opinion by
Judge Rogers,On February 11, 1976, at the suit of South Fayette Township, a judge of the Court of Common Pleas of Allegheny County enjoined the Center for Assessment and Treatment of Youth, Inc. (CATY), a nonprofit corporation, and David E. Hagan, its president, from continuing to operate a so-called secure treatment unit for juvenile delinquents on property owned and formerly used as an orphanage by another nonprofit corporation, The Boys’ Home, until the defendants should have complied with the Township’s zoning and land use ordinances. The Commonwealth of Pennsylvania, which was interested in the unit’s establishment and had contracted for its use as a place for the commitment of delinquents, was permitted to intervene. By order of March 15, 1976, the court found CATY and *257Hagan to be in contempt of court for operating the unit in violation of its February 11, 1976 order and imposed fines on each. CATY and the Commonwealth have appealed the February 11, 1976 injunction order and CATY, Hagan and the Commonwealth have appealed the March 15, 1976 contempt order, the Commonwealth because it paid CATY’s and Hagan’s fines.
The Township’s original complaint in equity seeking the injunction named The Boys’ Home and a third nonprofit corporation, Center for Community Alternatives (CCA) as defendants. It sought an order prohibiting the defendants from operating a “penal institution for juvenile criminal offenders.” A hearing on the application for a preliminary injunction was scheduled for January 30, 1976. On January 29, 1976 the Commonwealth sought intervention which the court allowed for the purpose of its participation in the preliminary injunction hearing. On the same day, Boys’ Home and CCA filed preliminary objections and motions to stay the hearing scheduled January 30,1976 pending determination of jurisdictional issues raised by their objections. Their motion was refused. On January 30,1976, the court, on motion of the Township, allowed the complaint to be amended so as to substitute CATY for CCA as a defendant.
The hearing was conducted on January 30, 1976. The Township produced evidence which tended to show that the use of the property as a home for juvenile delinquents was not permitted by its zoning ordinance; that no application for required zoning and occupancy permits had been made; that the presence of adjudicated juvenile delinquents on the property posed a threat to the health, safety and welfare of the community; and that other facilities within the Township and owned by the Commonwealth were available for His program. In defense, CATY, the Commonwealth and The Boys’ Home contended that the proposed se*258cure treatment unit would serve a valuable public service and that it would be harmful to the six delinquents which they had already placed on the property and to the program if the unit should be forced to close. Evidence of the fiscal and regulatory control exercised by the Commonwealth was also adduced.
On February 11, 1976, the chancellor preliminarily enjoined CATY and Hagan, its president and only incorporator, from using the property until appropriate Township zoning and occupancy permits had been sought and obtained. CATY and the Commonwealth appealed to this Court from that order and applied unsuccessfully for supersedeas in the court below and in the Commonwealth and the Supreme Courts of Pennsylvania.
CATY and the Commonwealth first say that the court below was without jurisdiction in equity because the Township had available to it adequate statutory remedies under the Township’s zoning and land use ordinances, and presumably under Acts of the General Assembly. This argument is totally devoid of merit. Section 617 of the Pennsylvania Municipalities Planning Code1 empowers municipalities to bring actions to restrain the use of land in violation of their ordinances enacted pursuant to the Act. See also Hilltown Township v. Mager, 6 Pa. Commonwealth Ct. 90, 293 A.2d 631 (1972).
CATY and the Commonwealth next complain that the chancellor erred by failing to rule on their preliminary objections prior to conducting a hearing and deciding that the preliminary injunction should issue. Their argument seems to be that a court may not grant a preliminary injunction without first disposing of preliminary objections; that if the preliminary objections are dismissed the court may not grant the pre*259liminary injunction until the defendants have filed an answer; and that if the preliminary objection raises a question of jurisdiction the court may not grant the preliminary injunction until a disappointed defendant has pursued his appeal to higher courts. If this were the law, which it is not, preliminary injunctions would be rare indeed. The defendants’ objections in this case were filed on the day before the scheduled preliminary injunction hearing. At the January 30, 1976 hearing the trial court admitted evidence relating both to the preliminary objections and to the preliminary injunction. On the same day it disposed of some of the preliminary objections by permitting the Commonwealth to intervene as a party defendant and ordering that CATY be substituted as a defendant for CCA. On February 11, 1976 the chancellor, in addition to issuing the preliminary injunction, overruled the defendants’ remaining preliminary objections. The so-called jurisdictional objection, the presence of which is advanced as a reason why the chancellor should not have granted an injunction, was the same objection to equity jurisdiction which we have discussed and found to be without merit.
The appellants also contend that the court’s order offended the principle that a preliminary injunction should not be granted unless the right of the plaintiff is clear and unless immediate and irreparable injury would result if the injunction is not granted. In Hilltown Township v. Mager, supra, we held that a landowner’s action in building and leasing units in an apartment house without obtaining building and zoning permits established clear right of the plaintiff to injunctive relief and constituted a sufficient showing of clear and immediate harm. In affirming the order granting the preliminary injunction, we wrote:
It is clear that the injury to the Township is immediate as well as irreparable. At the hear*260ing, the Township established a prima facie showing that appellants were in violation of the Township’s building and zoning ordinance. Appellants’ continuing violation of the Township’s ordinance is unlawful conduct of a most serious nature and a threat to the health, safety and welfare of the remainder of the Township populace. Such conduct is a proper subject for preliminary injunctive relief. See Pennsylvania Public Utility Commission v. Israel, 356 Pa. 400, 52 A.2d 317 (1947). ‘A preliminary injunction is to put and keep matters in the position in which they were before the improper conduct of the defendants commenced and to prevent them from gaining any advantage by their own wrongful acts: (citing eases).’ Pennsylvania Public Utility Commission v. Israel, supra, at 408, 52 A.2d at 321-22.
6 Pa. Commonwealth Ct. at 96, 293 A.2d at 634.
The preliminary injunction was properly granted. The involvement of the Commonwealth as a contractor for the defendants’ services, which may have provided the basis for the argument that the Township’s zoning regulations were unenforceable against the State, was deprived of significance by the holding of the Supreme Court in City of Pittsburgh v. Commonwealth, Pa. , 360 A.2d 607 (1976), that State programs are subject to municipal zoning regulations unless specifically exempted by statute.
On March 8, 1976 the trial court conducted a hearing on the Township’s suggestion of contempt and motion to enforce the injunction granted on February 11, 1976. The ensuing order which CATY, Hagan and the Commonwealth have appealed is as follows:
And Now, to-wit, this 15th day of March, 1976, it appearing to the Court that on February 11, 1976 this Court issued an injunction re*261straining David E. Hagan, Ph.D. and the Center for the Assessment and Treatment of Youth, Inc. from continuing to use the property of the Boys’ Home until such time as they have complied with the zoning and land use ordinance of South Fayette Township; and,
It Further Appearing to the Court that a copy of the Order and Opinion accompanying it was served on counsel for David E. Hagan, Ph.D. and the Center for the Assessment and Treatment of Youth, Inc.; and,
It Further Appearing to the Court that a copy was personally served on David E. Hagan, Ph.D. and the Center for the Assessment and Treatment of Youth, Inc.; and,
It Further Appearing to the Court that David E. Hagan, Ph.D. and the Center for the Assessment and Treatment of Youth, Inc. have contumeliously and superciliously refused to obey and comply with the aforesaid Order of February 11,1976.
Now Therefore, it is hereby Ordered, Adjudged and Decreed as follows:
1. That David E. Hagan, Ph.D. and the Center for the Assessment and Treatment of Youth, Inc. be and the same are hereby in contempt of Court; and
2. That David E. Hagan, Ph.D. and the Center for the Assessment and Treatment of Youth, Inc. are hereby fined $250.00 a day each and every day from February 18, 1976 through March 8,1976 or a total of $5,000 each. The fine is payable forthwith to the County of Allegheny; and,
3. That for each day subsequent to March 8, 1976 that David E. Hagan, Ph.D. and the Center for the Assessment and Treatment of Youth, *262Inc. fail to comply with the Order of this Court that they are hereby fined the sum of $250.00.
Two days after this order was issued the court approved a stipulation of the parties that no fines would be imposed relating to the period from March 17, 1976 to March 31,1976, the later date being that anticipated as the time when the home would no longer be in operation. The Commonwealth, CATY and Dr. Hagan have appealed from the order as so modified.
Appeals from contempt orders have been the occasion of sometimes illuminating and usually lengthy dissertations on the purposes respectively of indirect criminal and civil contempt and the proper means of distinguishing the one from the other. Most of the learning on the subject can be expressed in a few short sentences. "Where the sanctions for contempt are imposed for the purpose of punishing the perpetrator for assaulting the dignity of the court, the proceedings are in indirect criminal contempt. As such, they are governed by the Act of June 23, 1931, P.L. 925, 17 P.S. §§2047, 2048, which requires admission of bail, provisions for trial by jury and other procedural safeguards, and which limits punishment to a fine not exceeding $100 or imprisonment not exceeding 15 days.
If the purpose of sanctions is to coerce the subject into compliance with the order so that the successful litigant may have the relief to which he has been found entitled, the proceeding is one for civil contempt. But orders in civil contempt proceedings must provide conditions, compliance with which will exonerate the one charged from the ordered punishment. Philadelphia Marine Trade Association v. International Longshoremen’s Association, 392 Pa. 500, 140 A.2d 814 (1958); Knaus v. Knaus, 387 Pa. 370, 127 A.2d 669 (1956).
Generally, the law is stated to be that the dominant purpose of a contempt proceeding determines whether it is civil or criminal. If the purpose of the proceed*263ing is remedial and the sanctions are imposed to coerce the defendant into compliance (or in some instances to compensate the complainant for losses sustained) it is indirect civil contempt. If, on the other hand, the dominant purpose is to vindicate the dignity and authority of the court and to protect the interest of the general public, it is a proceeding for indirect criminal contempt. East Caln Township v. Carter, 440 Pa. 607, 269 A.2d 703 (1970); Brocker v. Brocker, 429 Pa. 513, 241 A.2d 336 (1968); Commonwealth ex rel. Beghian v. Beghian, 408 Pa. 408, 184 A.2d 270 (1962); and Knaus v. Knaus, supra.
Reverting now to the order in this case, it evinces purposes both punitive and coercive. The use of the words contumeliously and superciliously in characterization of the defendants’ refusal to obey the order, and the imposition of fines for past conduct and without statement of conditions which might produce remission, suggest that the proceeding was for indirect criminal contempt. However, paragraph 3 of the order imposing a fine on each of the defendants for each day after March 8, 1976 that they have not complied with the order contains indications of both indirect criminal and civil contempt. The fine imposed for the period between March 8 and March 15, the date of the order, would suggest punishment. The provision that the fines would cease at such time in the future as the defendants should comply indicates civil contempt. While on balance we are inclined to view the order as one punishing for indirect criminal contempt, we are not required to decide the nature of the order because whether for indirect criminal or civil contempt the fines cannot be upheld. If the proceeding was one for indirect criminal contempt, the defendants were not afforded their rights under the Act of 1931 and the penalties were in excess of the statutory limitation. If the order was intended as one in civil eon-*264tempt the $5000 fines imposed by paragraph 2 are inappropriate because the order provided the defendants no opportunity to escape the penalty by compliance. The same consideration applies to the daily fines imposed by paragraph 3 of the order dated March 15, 1976. These fines are ordered to be paid from March 9, 1976 until compliance. It will be recalled the parties stipulated, with the chancellor’s approval, that this sanction should end as of March 17, if the defendants complied with the February 11 order by March 31, which they did. The result is that only one day’s fine, that for March 16, is imposed under paragraph 3. The court’s order as to that day, if viewed as in civil contempt, was ineffective because being entered on March 15, it did not afford the defendants a realistic opportunity to comply. We conceive that not only must an order in civil contempt be imposed conditionally but also that the condition must itself be reasonable.
The plaintiff below also argues that the order of March 15, 1976, although unconditional, may nevertheless be viewed as appropriate to civil contempt because the fines therein imposed were intended to compensate the plaintiff. See United States v. United Mine Workers of America, 330 U.S. 258 (1947). It is not apparent that South Fayette Township was to be compensated by fines paid to Allegheny County, as the order requires. Moreover, the record contains no evidence that the Township sustained any losses compensable by money as the result of the defendants’ refusal to comply with the February 11,1976 order.
We will therefore affirm the court’s order of February 11,1976; but vacate the order of March 15, 1976 and order the remission of fines paid pursuant thereto.
*265Order
And Now, this 25th day of July, 1977, it is ordered that the order of the court below made February 11, 1976, the subject of the appeals to this Court at Nos. 255 and 355 C.D. 1976, be and it is affirmed; and that the order below made March 15, 1976, which is the subject of the appeals to Nos. 525, 552 and 636 C.D. 1976, be and it is hereby vacated and that all fines paid pursuant thereto be remitted.
Act of July 31, 1908, P.L. 805, as amended, 53 P.S. §10017.