This cause comes to this court by the granting of a leave to appeal from a judgment of the Appellate Court for the Fourth District. That court reversed a decree of the circuit court of Marion county dismissing plaintiff's complaint for want of equity and striking its petition for a subsurface directional survey of defendants' oil wells. *Page 538
Defendants owned an oil lease on a tract of land one-half a mile long, six feet wide at one end and thirty-three feet at the other. Nine wells had been drilled on this strip all being located on or near the center line, and all of them were producing oil. Plaintiff owns oil leases on the land which surrounds the strip. As the defendants drilled their wells plaintiff proceeded to drill offset wells, until, on February 20, 1939, it had a total of sixteen. On that date plaintiff filed a verified complaint in equity, wherein it made the following pertinent allegations. It stated upon information and belief that the wells of defendants were, "drilled with rotary tools; that oil and gas wells drilled with rotary tools, which are drilled to a depth sufficient to reach the Benoist and McClosky horizons in the location of said real estate, can not be drilled perfectly straight, and the bottom thereof be directly under the top of said holes; that the courses of wells so drilled are deflected and slanted from the vertical, and that said wells were completed with the bottoms thereof in the productive Benoist and McClosky oil and gas formations underlying the real property * * * upon which plaintiff * * * is the owner and holder of oil and gas leasehold estates." Upon information and belief, plaintiff further alleged that the defendants, by means of their wells, had been and were obtaining oil from the sands underlying the property of plaintiff and unless restrained they will continue to do so to the irreparable injury of plaintiff. Further, that it would be very difficult to ascertain and determine the compensatory damages so as to afford adequate relief and that the nine wells so constructed constitute a continuing trespass upon and the taking of the substance of real property which belonged to the plaintiff.
The relief asked was that defendants be perpetually restrained against the operation of the wells from within plaintiff's property; that defendants be compelled to plug and permanently abandon all portions of the wells within *Page 539 the boundaries of plaintiff's property, and that they be required to account for the oil and gas taken from plaintiff's property.
Contemporaneously with the filing of the complaint, plaintiff filed a verified petition for a subsurface directional survey of defendants' wells. Therein it alleged the substance of what had been alleged in the complaint upon information and belief and that the exact course and direction of the wells could be established by a subsurface survey thereof and that "such survey is a necessary step to plaintiff's preparation for the trial of this cause, and is essential for the court's determination thereof;" that plaintiff is entitled to a court order directing a survey under the court supervision; "that this * * * court as a court of equity and by virtue of its general powers, has full and complete authority to order such inspection and survey," etc., that the survey will entail only a temporary and limited interruption of the use of the property by defendants and can be made without damage or injury to the wells.
It is further alleged that the reasonable value of the use of said real property, wells, derricks and equipment as the surveyors may make thereof, including the necessary interruption of the production from said wells while they are being surveyed, will not exceed $400 per day. On information and belief it was alleged that a survey under normal conditions could be made in forty-eight hours. Plaintiff offered to bear and sustain the costs of the making of the survey and all costs and expenses which the court might reasonably require in connection with the granting of the prayer of the petition, and offered to furnish bond conditioned for the payment of the same.
The prayer was that the court enter an order "that subsurface directional survey be made of said nine oil and gas wells described in the complaint herein; that it designate the surveyors to make said surveys; that it empower the surveyor to employ necessary assistance; that the sheriff *Page 540 be directed and instructed to enforce the execution of said order, and the compliance therewith; that the defendants be instructed to refrain from interference with the operations of said surveyors; that upon the completion of said surveys, a report thereof be made and filed with the court and that the court make such further orders and directions as it deemed proper to carry out said surveys." Attached to the petition and made a part thereof were the separate affidavits of three persons, each purporting to be qualified to express an opinion upon the matters included in the affidavit. The subject matters covered in general referred to the same matters as were stated in the petition and complaint on information and belief. The affiants were of the opinion that the wells of defendants deviated from the vertical to such an extent that the bottoms of the wells were not on the lands described in the defendants' lease. The description of the strip of land in controversy was set forth in the complaint and it was alleged that Denzil M. Hollingsworth, Polly Hollingsworth, also known as P.T. Hollingsworth, Henrietta J. Cornwell, Alex M. Cornwell, W.B. Priest and Brown Richardson, Inc., claimed to be the owners of an oil and gas lease dated August 31, 1938, executed by Vena May Kalkbrenner and George K. Kalkbrenner, her husband, on the said described property. The petition for the survey did not set forth the names of the defendants but reference was made therein to the filing of the complaint as being one to recover damages for trespass upon the property of the plaintiff and frequent reference is made therein to the opposing parties as the "defendants." In view of these allegations and the prayer of the petition, the persons named in the complaint as claiming an interest in the lease are to be considered as the defendants to the petition.
The record does not disclose that summons was ever issued against any of the defendants. The only attempt to give them notice of the filing of either the complaint *Page 541 or petition was by a notice mailed to each of them by plaintiff the same day the complaint and petition were filed. The notice so mailed advised them that four days later, February 24, the plaintiff would appear before the circuit court of Marion county and move the court for an order for subsurface directional survey of the nine wells located on the real estate on which defendants held the lease and that a written and verified petition and motion for such survey was on file with the clerk of said court. The filing of the complaint was not mentioned in the notice.
Proof of the mailing of such notice was made by affidavit, and it appears that two notices were mailed to each of the Hollingsworths, Cornwells and to W.B. Priest, one addressed to a street number in St. Louis, Missouri, the other to Centralia, Illinois. The notice to Brown Richardson, Inc., was mailed to Centralia, Illinois. Proof is also made by affidavit that notice was served on Brown Richardson, Inc., by delivering a true and exact copy of the notice to William Richardson, an employee and agent of said corporation in Centralia on February 20.
Brown Richardson, Inc., by special and limited appearance for the purpose of filing a motion, moved that the petition for the survey be dismissed. The Hollingsworths and Cornwells, by limited and special appearance, filed a similar motion. Priest did not enter his appearance and there is nothing in the record to show that service was had upon him. The motions were sustained and the petition and complaint were dismissed for want of equity. It can not be determined from the facts pleaded whether or not the interests of the Kalkbrenners would be affected by an order granting the prayer of the petition.
The decree dismissing the complaint and petition recited that the complaint was dismissed for the reason plaintiff's counsel stated in open court, for the purposes of the record, that the proof to support the allegations of the complaint in respect to the courses and directions of defendants' wells *Page 542 being bottomed on their land "could only be furnished upon the proof expected and hoped by the plaintiff to be obtained by the subsurface directional survey presented in said petition and that the plaintiff had no further or other proof on said allegations of the complaint."
On appeal, the Appellate Court reversed the decree and remanded the cause, with directions to the trial court to deny the motion to dismiss the petition for survey; to enter a reasonable rule on defendants to answer the petition, and, upon the filing of an answer, the court to determine whether a survey should be ordered. It further directed that in the event the defendants did not answer the petition, the court should order the directional subsurface survey, after exacting indemnifying guarantees against damage to defendants' wells.
A question is raised as to whether the parties interested in the results that might be obtained in this litigation were before the court. A question preliminary to this is whether the petition is to be treated as a proceeding authorized by the Mining act (Ill. Rev. Stat. 1939, chap. 94) or whether it is considered as a proceeding interlocutory to an action in equity. If it is under the Mining act it is by a special statute and the procedure would be controlled by such act. If it is interlocutory to an equity action, the matters of parties is to be determined by the rules of equity procedure. It will not be necessary to determine in this case whether the provisions of the Mining act are applicable to a survey of oil wells or whether it is available to a proceeding of this character for the reason that plaintiff, by its complaint and petition, has clearly characterized the action as one in equity in which it seeks to invoke the general powers of a court of equity. This is well illustrated by a sentence in paragraph 3 of the petition which is as follows: "That this honorable court as a court of equity and by virtue of its general powers has full and complete authority to *Page 543 order such an inspection and survey in the above entitled complaint."
Reference to the allegations of the complaint and petition and the relief sought by each, leaves no doubt but that the petition was interlocutory to the relief prayed in the complaint. The petition does not ask the aid of the court to seek and discover a known, existing, evidentiary fact, but asks that it may, under supervision of the court, have defendants' wells surveyed to determine whether they are in the condition set forth in the complaint. If the facts developed from the survey are as plaintiff anticipates, it expects to use them as evidence to support the allegations of the complaint. Its counsel stated, for purposes of the record, that without such facts it could not determine whether it could maintain its action. The petition is interlocutory to an equitable action and must be considered by the rules that control in equity matters.
The general equitable rule is that all persons possessing a substantial legal or beneficial interest in the subject matter of litigation and who will be affected by the decree must be made parties. (Riley v. Webb, 272 Ill. 537; McCreery v. Bartholf, 305 id. 325; Cowles v. Morris Co. 330 id. 11.) When all the parties are before the court the whole case may be considered and all interests protected and the court is then enabled to make a complete decree binding on all parties who have a substantial beneficial interest in the subject matter of the litigation and thereby dispose of the whole complaint. Atkin v. Billings,72 Ill. 597; McMechan v. Yenter, 301 id. 508.
If the lack of parties is brought to the attention of the court, be it one of original or appellate jurisdiction, the court should not proceed further in the matter until the omission has been corrected even though no objection is made by any party litigant. (Gerard v. Bates, 124 Ill. 150; Abernathie v. Rich, 229 id. 412.) The general rule of *Page 544 equity pleading requiring that all persons should be made parties who are legally or beneficially interested in the subject matter and result of the suit so that a complete decree may be made between them applies to an action for injunctional relief. (Knopf v. First Nat. Bank, 173 Ill. 331; McMechan v. Yenter, supra.) When the omission of necessary parties is noted the ordinary procedure is for the court to stop further proceedings. McMechan v. Yenter, supra.
From the facts appearing on the face of the complaint and petition it is apparent that there are persons who have an interest in the lease and in keeping the oil wells in operation that were not before the court. In this condition of the record we are not privileged to give consideration to the reasons urged in support of the motion to dismiss the petition nor pass upon the merits of the petition. The chancellor erred in undertaking to pass upon the motion to strike the petition and in dismissing the complaint for want of equity. The whole proceeding should have been stayed until the parties interested were before the court.
The Appellate Court reversed the decree and remanded the cause with directions. That part of the order which directed the trial court to grant the prayer of the petition if the defendants to the petition did not answer was, as to such defendants, a final order which disposed of the matters raised by the petition.
The judgment of the Appellate Court and the decree of the circuit court are reversed and the cause is remanded to the circuit court of Marion county, with directions to grant plaintiff leave to make all interested persons parties to the proceeding and to stay all action in the case until all persons having an interest are before the court, and that if plaintiff does not take such action within a reasonable time the complaint and petition be dismissed at its costs.
Reversed and remanded, with directions. *Page 545