
52 N.W.2d 251 (1952)
155 Neb. 412
STAHL
v.
ALLCHIN.
No. 33127.
Supreme Court of Nebraska.
February 29, 1952.
*252 Torgeson, Halcomb & O'Brien, Kimball, for appellant.
VanSteenberg & Myers, Kimball, for appellee.
Heard before SIMMONS, C. J., and MESSMORE, YEAGER, CHAPPELL, WENKE, and BOSLAUGH, JJ.
CHAPPELL, Justice.
On July 12, 1951, plaintiff filed this action in the district court. His petition purportedly contained two causes of action. The first sought to enjoin defendant from trespassing upon certain described farm lands, except 60 acres thereof then in wheat to be harvested by defendant during the summer of 1951, and thereafter to perpetually enjoin defendant from also trespassing thereon. It also sought to temporarily enjoin defendant from in any manner molesting plaintiff in his peaceful possession of the premises pending the trial of both causes of action.
The second cause of action, relying substantially upon the same allegations as alleged in the first, sought to have immediately declared and established plaintiff's exclusive right to possession of the premises and to plant and harvest certain crops thereon during the fall of 1951, alleging that unless such determination is so made he will suffer irreparable injury by the continuing trespasses of defendant and that he has no adequate remedy at law since he, the plaintiff, was rightfully in possession of the premises.
In both causes of action plaintiff also prayed for general equitable relief.
His right to the foregoing relief was predicated primarily upon the provisions of a written recorded lease allegedly executed by the owner Alice S. Palmer as lessor, with plaintiff as lessee, on November 27, 1950, for a term from March 1, 1951, to September 1, 1953, of which defendant had notice and knowledge, but for reasons hereinafter discussed refused to recognize as valid and effective.
After a hearing the trial court denied plaintiff's application for a temporary injunction. Defendant demurred to both causes of action for defect of parties plaintiff or defendant, misjoinder of causes of action, and generally for failure to state facts sufficient to constitute a cause of action. His demurrer was subsequently overruled and defendant answered, denying generally plaintiff's right to any relief upon either cause of action and affirmatively alleging that defendant had at all times involved since August 1950 been in open, peaceful, and lawful possession of the premises upon which plaintiff was and had been a trespasser.
Defendant's alleged possession and right thereto was predicated upon the provisions of a written recorded lease executed on behalf of the owner Alice S. Palmer as lessor, with one Wayne A. Enyeart as lessee, on December 15, 1948, for a term from March 1, 1949, to March 1, 1952. On August 29, 1950, Wayne A. Enyeart allegedly, for valuable consideration recited therein, assigned such lease and certain crops on the premises in writing to defendant, subject to the landlord's approval allegedly obtained, and that defendant then went into possession thereunder prior to the execution of plaintiff's lease on November 27, 1950.
After a hearing upon the merits the trial court rendered a decree finding generally for defendant and against plaintiff on the first cause of action, dismissing the same, and finding generally for plaintiff and against defendant on the second cause of action. In other words, the decree found in effect that defendant was rightfully in possession under a proper assignment approved by the lessor and that under the circumstances plaintiff could not by injunction obtain possession, thereby putting defendant *253 out of possession as prayed in plaintiff's first cause of action. However, the decree undertook to settle the controversy by concluding that plaintiff under provisions of the leases and circumstances involved was entitled to possession of all the land on March 1, 1952, and also had a right to enter and sow fall crops in the summer-fallowed ground in the fall of 1951 to mature after March 1, 1952, all purportedly as prayed in plaintiff's second cause of action.
Defendant's motion for new trial was overruled and he appealed, assigning substantially, insofar as important here, that the judgment on the second cause of action was contrary to law. We sustain the assignment. On the other hand, plaintiff did not file a motion for new trial but cross-appealed, assigning substantially, insofar as important here, that the trial court erred in dismissing plaintiff's first cause of action. We conclude that the assignment has no merit.
The record discloses without dispute that at the comencement of this action and at all times prior thereto, beginning in March 1951, both parties claimed the right to possession of the premises involved. Plaintiff, claiming the right to possession under the written lease executed on November 27, 1950, for a term from March 1, 1951, to September 1, 1953, undertook during the temporary absence of defendant to cultivate portions of the land and plant spring barley on the premises in March 1951. However, defendant, then claiming to have been in peaceful possession under and since his August 29, 1950, assignment of the written lease executed on December 15, 1948, for a term from March 1, 1949, to March 1, 1952, almost immediately notified plaintiff of his possession and rights thereunder, undertook to prevent plaintiff from planting such crops, and went forward with his own cultivation and planting thereon. As a matter of course, in the light thereof plaintiff never was in peaceful possession as alleged in his petition, but under his first cause of action was simply attempting to obtain by injunction such possession and put defendant out of his claimed possession.
It is well established that under such circumstances injunction could not be so invoked by plaintiff. It has long been the rule that: "A litigant cannot successfully invoke the extraordinary remedy of injunction, the effect of which would be to obtain possession of real estate, unless the facts and circumstances in the case are such that his ordinary legal remedies are inadequate." Hollinrake v. Neeland, 94 Neb. 530, 143 N.W. 809; Reed v. Wellman, 104 Neb. 292, 177 N.W. 170; Vance v. Sumner, 119 Neb. 630, 230 N.W. 490. See, also, Mohat v. Hutt, 75 Neb. 732, 106 N.W. 659, and Vance v. Henderson, 141 Neb. 766, 4 N.W.2d 833, so holding under circumstances singularly comparable with those at bar.
We therefore conclude as a matter of law that the trial court properly denied plaintiff injunctive relief and correctly dismissed plaintiff's first cause of action. Fenster v. Isley, 143 Neb. 888, 11 N.W.2d 822, 823, relied upon by plaintiff is clearly distinguishable upon the facts. Therein defendant was truly a trespasser because he "was neither in possession nor did he have a right to possession."
With regard to the second cause of action, plaintiff argued that he sought thereby to have judicially declared his right to possession of the premises and certain crops planted thereon in 1951; had a right to have the controversy between plaintiff and defendant over the question of possession under their respective leases settled; and their rights, status, and duties judicially declared, as provided in the declaratory judgments act. Viewed in such light, we conclude as a matter of law, without deciding questions of fact, that plaintiff was not entitled to the relief demanded and that the granting thereof by the trial court was erroneous for the reason that necessary parties were not impleaded in the action.
In that connection both leases were concededly upon their face executed and delivered at different times to different lessees by or for the same lessor, who was not made a party to this action. Wayne A. Enyeart was lessee in the first lease, and on August 29, 1950, for valuable consideration *254 involving no small amount, assigned said lease and certain crops to defendant upon condition that the lessor approve such assignment, and defendant allegedly went into possession thereunder. Whether or not such assignment was approved by the lessor is in dispute, and the assignor was not made a party to this action. It will be noted that plaintiff was lessee in the other lease executed and delivered after assignment of the first and after possession thereunder had been allegedly taken by defendant. Both leases were executed on like farm lease forms, but both contained different typewritten provisions which appear to be conflicting and required construction in some material respects. Further, both leases purported thereby to lease the same premises to different lessees for the same period from March 1, 1951, to March 1, 1952. In such a situation, Wayne A. Enyeart, defendant's assignor, and the lessor of both leases as well were necessary parties in order for plaintiff to obtain a declaratory judgment. This is true because the court could not declare the rights of plaintiff and defendant without determining the correlative rights, duties, and obligations of the assignor and lessor, which the court had no jurisdiction to do.
The situation is controlled by the holdings in Redick v. Peony Park, 151 Neb. 442, 37 N.W.2d 801, 803, which opinion cites and discusses authorities and comparable cases from this and other jurisdictions. Therein this court held that: "Section 25-21,159, R.S.1943, puts the duty upon the plaintiffs in the first instance of joining as parties all persons who have or claim any interest which would be affected by the declaration. * * *
"An action to secure a declaration of rights is designed to terminate a controversy so far as it relates to the parties and facts giving rise thereto, and courts should, under most circumstances, dismiss such an action without prejudice, whenever all parties, whose claims gave rise to the controversy and whose rights upon such claims would be adjudicated by the declaration sought, had they been a party to the action, have not been impleaded.
"There must be an actual and bona fide controversy as to which the judgment will be res adjudicata. Such a case requires that all the interested parties shall be before the court.
"The Uniform Declaratory Judgments Act does not contemplate the adjudication of interests of a party over which the court has no jurisdiction."
Other matters were presented and argued in the briefs, but in the light of the foregoing conclusions they require no discussion.
It follows for the reasons heretofore stated that the judgment of the district court dismissing plaintiff's first cause of action should be and hereby is affirmed; and that the judgment upon the second cause of action should be and hereby is reversed, and the cause is remanded with directions to dismiss the same without prejudice. All costs in the district court and in this court are taxed to plaintiff.
Affirmed in part, and in part reversed and remanded with directions.
