
    383 P.2d 864
    KEENAN PIPE AND SUPPLY CO., a corporation, Petitioner, v. SUPERIOR COURT of the State of Arizona IN AND FOR the COUNTY OF PIMA, Honorable Herbert F. Krucker, Judge, and City of Tucson, a municipal corporation, Respondents.
    No. 7975.
    Supreme Court of Arizona. En Banc.
    July 11, 1963.
    Scruggs & Rucker, by D. Thompson Slutes, Tucson, for petitioner.
    Calvin Webster, City Atty., by James M. Abbey, Asst. City Atty., for respondent City of Tucson.
   BERNSTEIN, Chief Justice.

This is a petition'for a writ of prohibition directed to the Superior Court of Pima County. The application asked this Court to prohibit the superior court from enforcing one of its orders on the ground that the superior court was without jurisdiction to enter the order.

On February 6, 1963, petitioner here filed an action for a declaratory decree and for other relief in the Superior Court of Pima County. Defendants were the Southern Pacific Company and the City of Tucson. In its action petitioner sought to have a determination that it had the right to use and possess certain property and that defendants could not terminate a lease concerning certain property between petitioner and the Southern Pacific Company. The Southern Pacific Company initially filed an answer. The city filed only a motion to dismiss containing, essentially a plea in bar. The Southern Pacific Company thereafter, among other things, filed motions for summary judgment and judgment on the pleadings. Tucson’s motion to dismiss was based on the contention that petitioner had not filed a claim against the city as required by the city charter.

On May 3, 1963, the motions of the Southern Pacific Company were granted and judgment was entered for the company and against the plaintiff. The effect of this judgment was to determine the Southern Pacific Company had properly terminated its lease with petitioner. On May 13 the motion to dismiss by the City of Tucson was granted and judgment was entered that the action and complaint be dismissed with prejudice as to the city.

On May 29 the City of Tucson, in the same action, filed a petition for an order to show cause. In its petition the city requested the trial court to order petitioner to remove a building from the leased land pursuant to termination provisions of the lease, and on June 7 an order was entered granting the relief as prayed for by the city.

The City of Tucson argues that the trial judge had jurisdiction to enter its order under Sec. 12-1838 A.R.S. which reads:

“§ 12-1838. Supplemental relief
“Further relief based on a declaratory judgment or decree may be granted whenever necessary or proper. The application therefor shall be by complaint or appropriate pleading to a court having jurisdiction to grant the relief. If the application be deemed sufficient, the court shall, on reasonable notice, require any adverse party whose rights have been adjudicated by the declaratory judgment or decree, to show cause why further relief should not be granted forthwith.”

This section is a part of the Uniform Declaratory Judgment Act, § 12-1831 et seq. A.R.S.

The position of the city is that it has property rights granted to it by the Southern Pacific Company and stands in its shoes and the order is in furtherance of the judgment in the action for a declaratory decree.

In view of our disposition of this case we need not decide the scope of supplemental relief provided for in § 12-1838 or to whom that relief might be available in other circumstances. Here, the City of Tucson, by its own motion, removed itself as a party to the lawsuit. The lawsuit ended in a favorable judgment for its co-defendant, the Southern Pacific Company. Tucson now attempts to obtain affirmative relief based on the judgment in favor of the Southern Pacific Company. Where a party has dismissed himself out of a lawsuit the trial court no longer has jurisdiction to enter orders granting him affirmative relief as to the merits of that suit and a wr* of prohibition to the trial court will lie.

“Of course, the effect of a dismissal, where the answer seeks no affirmative relief, and which is made under the provisions of the Code, as was done in this case, is ipso facto to terminate the case and oust the court of jurisdiction to proceed, (citing cases)
“It follows that, although the court had previously possessed jurisdiction over the persons and the subject-matter of the suit in question, such jurisdiction had been completely lost. Hence the judgment rendered and all other steps taken subsequently to the dismissal of the action are void for want of jurisdiction.
“Where the court has lost jurisdiction as a result of a dismissal by the plaintiff and his attorneys, prohibition will be granted to restrain further illegal and unauthorized action about to be taken.” Smurda v. Superior Court, Cal.App. 266 P. 843, 845.

There is no distinction between a plaintiff who voluntarily dismisses himself from an action and a defendant who does the same thing.

Writ of prohibition heretofore issued made permanent.

UDALL, V. C. J., and STRUCKMEYER, JENNINGS and LOCKWOOD, JJ., concur.  