Each of these three cases arises out of a suit brought by the state to enjoin unreasonable waste of gas, and each involves the question whether certain defendants are entitled to a writ of prohibition to prevent the trial of issues raised by a cross-complaint filed by other defendants.
Following a complaint by some of the operators in an oil field that there was an unreasonable waste of gas contrary to the provisions of section 3300 of the Public Resources Code, 1 the State Oil and Gas Supervisor held hearings pur *820 suant to section 3302 et seq., determined that gas was being wastefully produced and ordered all operators in the field to cease production of gas in excess of a specified rate. Appeal was taken to the board of oil and gas commissioners for the district, and the findings and order of the supervisor were adopted with slight modifications. A suit was then brought by the People pursuant to sections 3310 2 and 3312 3 of the Public Resources Code to enjoin unreasonable waste of gas. Certain defendants filed a cross-complaint seeking to enjoin the other defendants from wasting gas and to recover damages from all but one of them for past waste. Demurrers to the cross-complaint were overruled, and motions to strike it were denied. Petitioners then sought prohibition, claiming that respondent court has no power to consider a cross-complaint in this type of suit. The ayailability of the writ depends upon whether petitioners have any other plain, speedy and adequate remedy, and whether respondent court, in trying the issues raised by the cross-complaint, would be acting without or in excess of its jurisdiction.
When the trial court overruled the demurrers and denied the motions to strike, it in effect ordered the case to trial upon the cross-complaint as well as upon the complaint. These rulings are not immediately reviewable by appeal, since they are not final judgments and do not otherwise come within the appealable orders enumerated in section 963 of the Code of Civil Procedure. Although the propriety of the court’s action may, of course, be reviewed upon appeal from a final judgment in the ease, this would not constitute a plain, speedy or adequate remedy because petitioners would be required to undergo the delay and expense of a complicated, lengthy trial upon the question of damages.
(Tomales Bay
*821
etc. Corp.
v.
Superior Court,
The term jurisdiction has a broader meaning when used in considering the availability of prohibition to review an order than when used in determining whether a court lacks power in the fundamental sense, i. e., whether it has jurisdiction over the subject matter and the parties.
(Abelleira
v.
District Court of Appeal,
Section 442 of the Code of Civil Procedure provides, “Whenever the defendant seeks affirmative relief against any party, relating to or depending upon the contract, transaction, matter, happening ■ or accident upon which the action is brought, or affecting the property to which the action relates, he may, in addition to his answer, file ... a cross-complaint. ...” (Italics added.) An action is defined as “an ordinary proceeding in a court of justice by which one party prosecutes another for the declaration, enforcement, or protection of a right, the redress or prevention of a wrong, or the punishment of a public offense.” (Code Civ. Proc., §22.) “Every other remedy is a special proceeding.” (Code Civ. Proc., § 23.) Section 442 is a general provision which, in the absence of a specific statute to the contrary, is sufficiently broad to permit the use of a cross-complaint in any “action.” It does not, howeyer, on its face authorize the use of a cross-complaint in a “special proceeding,”
*822
The first question to be determined is whether this suit falls within the classification of an “action” or whether it is a “special proceeding.”
4
As a general rule, a special proceeding is confined to the type of case which was not, under the common law or equity practice, either an action at law or a suit in equity.
(In re Sutter-Butte By-Pass Assessment,
Carpenter
v.
Pacific Mut. Life Ins. Co.,
Petitioners assert that section 442 relating to cross-complaints, although applicable generally to actions, may not be used in a suit to enjoin waste of gas because, they argue, the reference in sections 3311 and 3313 of the Public Resources Code to the injunction provisions of the Code of Civil Procedure, together with the failure to mention other sections of that code such as section 442, discloses a legislative intent to prohibit the use of the other sections. However, neither the Public Resources Code nor the injunction provisions to which it refers expressly prohibit use of a cross-complaint, and, by reason of the direct language of section 442 permitting a defendant to file a cross-complaint in an action, there is no room for the rule of statutory construction urged by petitioners. Moreover, the rules of practice set forth in the injunction provisions referred to do not purport to be complete in themselves but assume that other provisions of the Code of Civil Procedure shall apply insofar as they are consistent with the sections relating to injunctions. In accord with these views are a number of decisions which, without discussion of the problem, applied various sections of the Code of Civil Procedure to suits brought under the statutes involved here as they existed prior to codification in the Public Resources Code.
(Superior Oil Co.
v.
Superior Court,
The cases holding that cross-pleading is not permissible in unlawful detainer proceedings are clearly not in point. (See
Cheney
v.
Trauzettel,
Although our determination that a cross-complaint is permissible is based upon the conclusion that the suit is an action within the meaning of section 442 of the Code of Civil Procedure, we should point out that even if the suit were held to be a special proceeding, as contended by petitioners, it would not follow that a trial of the issues raised by the cross-complaint would be in excess of the court’s jurisdiction. Courts have inherent power, as well as power under section 187 of the Code of Civil Procedure,
6
to adopt any suitable method of practice, both in ordinary actions and special proceedings, if the procedure is not specified by statute or by rules adopted by the Judicial Council. It is not only proper but at times may be necessary for a court to follow provisions of the Code of Civil Procedure which are harmonious with the objects and purposes of the proceeding although those provisions are not specifically made applicable by the statute which creates the proceeding. As we have seen, there is no statute prohibiting use of a cross-complaint in a suit to enjoin waste of gas. Further, the rules of practice which are expressly made applicable to such a suit do not purport to be complete in themselves, and there is, therefore, no basis for an implication that those rules were intended to be exclusive. In addition, there are no rules developed under the doctrine of
stare decisis
which would bar use of a cross-pleading in the present situation. Accordingly, even if the suit were held to be a special proceeding, it would be within the power of the court to pass upon the
*826
question whether application of section 442 would be in harmony with the purposes of the particular type of suit, and an erroneous determination would be within and not in excess of the court’s jurisdiction, as that term is used in prohibition cases. (See
Abelleira
v.
District Court of Appeal,
It is further contended that, regardless of whether a cross-complaint is permissible in a suit of this kind, prohibition will lie here because, it is asserted, cross-complainants failed to exhaust their administrative remedies in that they did not petition the Director of Natural Resources for a hearing on the issue of gas wastage pursuant to section 3302 of the Public Resources Code,
7
which provides for a hearing upon complaint by any person operating in the field. (See
Abelleira
v.
District Court of Appeal,
Pacific Lighting Gas Supply Company advances a contention, applicable only to it, in support of its claim that the court lacks jurisdiction to try the issues raised by the cross-complaint. The statute making the unreasonable waste of gas unlawful refers specifically to waste by a lessor, lessee or operator. (Pub. Resources Code, § 3300.) Pacific asserts that it is a purchaser of gas from other defendants, that it is not a lessor, lessee or operator and that for this reason the cross-complaint does not and cannot state a cause of action against it. The only allegation appearing in the eross *827 complaint, which purports to connect Pacific with any alleged wrongful act is that “cross-defendant Carlton Beal has an obligation to the Sesnon group not to produce waster wells” and “all of the cross-defendants other than Carlton Beal had notice of his obligation and that it arose from a trust.” The cross-complaint, therefore, does not state a cause of action against Pacific.
It is the general rule that the failure to state facts sufficient to constitute a cause of action does not deprive a court of the power to hear and determine a controversy if it has jurisdiction of the parties and the subject matter.
(Athearn
v.
Nicol,
The alternative writ is discharged, and the peremptory writ is denied.
Shenk, J., Edmonds, J., Carter, J., Traynor, J., Schaner, J., and Spence, J., concurred.
The application of petitioners in Beal v. Superior Court, L. A. 23264, for a rehearing was denied February 24, 1955.
Notes
Section 3300 of the Public Resources Code provides as follows: “The unreasonable waste of natural gas by the act, omission, sufferance, or instance of the lessor, lessee or operator of any land containing oil or gas, or both, whether before or after the removal of gasoline from the gas, is opposed to the public interest and is unlawful. The blowing, release, or escape of gas into the air shall be prima facie evidence of unreasonable waste."
Section 3310 of the Public Besources Code provides in part as follows: “When the decision of the supervisor that there is an unreasonable waste of gas occurring or threatened, has become final, a certified copy thereof, or, if modified by the order of the board of district commissioners, then a certified copy of the order as modified, shall be filed with the director. The director, unless the order is complied with voluntarily, shall have proceedings instituted in the name of the people of the State of California to enjoin the unreasonable waste of gas.”
Section 3312 of the Public Besources Code provides in part as follows: “Whenever it appears to the director that the owners, lessors, lessees, or operators of any well or wells producing oil and gas or oil or gas are causing or permitting an unreasonable waste of gas, he may institute, or have proceedings instituted, in the name of the people of the State of California, to enjoin the unreasonable waste of gas regardless of whether proceedings have or have not been instituted under sections 3302 to 3305, and regardless of whether an order has or has not been made therein. ’ ’
There is no claim that the cross-complaint fails to comply with the requirement of section 442 that the relief sought relate to the same "contract, transaction, matter, happening or accident” or affect the "property” referred to in the complaint. An erroneous determination in this respect, as distinguished from a ruling requiring a party to proceed to trial on a cross-complaint where no such pleading is permitted, would not relate to the jurisdiction of the court.
(Lichtenstein
v.
Superior Court, 85
Cal.App.2d 486 [
In eminent domain, which has likewise been classified as a special proceeding, it has been held that a cross-complaint is proper.
(People
v.
Buellton Dev. Co.,
Section. 187 of the Code of Civil Procedure provides: “When jurisdiction is, by the constitution or this code, or by any other statute, conferred on a court or judicial officer, all the means necessary to carry it into effect are also given; and in the exercise of this jurisdiction, if the course of proceeding be not specifically pointed out by this code or the statute, any suitable process or mode of proceeding may be adopted which may appear most conformable to the spirit of this code.”
Section 3302 of the Public Resources Code provides: “Upon complaint being made to the director by any person operating in any oil field that there is occurring or threatened an unreasonable waste of gas in any field or fields, and when a petition is filed with the director requesting that a hearing be held to consider whether such waste is occurring or threatened, if it appears to the director that there is probable cause for such complaint, he shall order the supervisor to hold such a hearing and to fix a time and place therefor. A hearing may also be ordered by the director on the application of the supervisor.’’
