I concur in the conclusion reached by Mr. Justice BeNkett; but I base my conclusion upon different grounds.
On April 10, 1914, the State of Oregon commenced this suit against the Pacific Live Stock Company for *210the avowed purpose of bringing about a cancellation of deeds covering about 26,000 acres of land, claiming that the land bad been'fraudulently acquired by “dummies.” On May 2, 1914, the defendant demurred to the complaint; and subsequently on December 31, 1914, the court overruled the demurrer. Afterwards, on February 5, 1915, the defendant filed an answer which, besides admissions and denials, affirmatively alleged that the plaintiff had been guilty of laches, that the defendant was a bona fide purchaser for value, and that the defendant was and had been in adverse possession for more than ten years. The answer concluded with a prayer for costs and for “such other relief as may be meet in the premises.” On June 7, 1915, the state filed a reply containing admissions, denials and affirmative allegations, thus completing the issues.
On September 11, 1918, the state moved for a dismissal of this suit “without prejudice” on the alleged ground that state officials had recently discovered that “much of the land involved in the ease was acquired by forging real and fictitious persons’ signatures to the applications and deeds, and the complaint filed” in 1914 was not in the opinion of counsel for the state “broad enough to permit the introduction of evidence of such character and, therefore, it became necessary either to amend said complaint or to file a new complaint, and in order to prevent delay of filing a motion for permission to file an amended complaint, it was deemed advisable to dismiss the present suit and start a new suit. ’ ’ The motion was allowed by the court and the suit was “dismissed without prejudice”; and subsequently the state began another suit attacking the deeds to about 19,000 acres of the 26,000. In other words, this the first suit attacks the paper title *211to 26,000 acres of land; while the second suit attacks the paper title to 19,000 acres and makes no mention of the remaining 7,000 acres of land. The defendant moved to set aside the order of dismissal, and, when the Circuit Court overruled the motion, the defendant appealed. 1
It is vigorously contended that the Circuit Court was without lawful authority to dismiss the suit “without prejudice” because: (1) there had been a trial; and (2) the defendant had pleaded a counterclaim in its answer. This contention is based upon certain sections of the Code. Section 182, subdivision 1, L. O. L., provides that a judgment of nonsuit may be given against the plaintiff ‘ ‘ on motion of the plaintiff, at any time before trial, unless a counterclaim has been pleaded as a defense.” Section 410, L. O. L., declares that a decree dismissing a suit may be given against the plaintiff in the case specified in Section 182, subdivision 1; and ‘ ‘ such decree is a determination of the suit, but shall not have the effect to bar another suit for the same cause, or any part thereof. ’ ’ Relying upon the holdings in Hume v. Woodruff, 26 Or. 373 (38 Pac. 191), and Ferguson v. Ingle, 38 Or. 43 (62 Pac. 760), the defendant argues that the ruling upon the demurrer was a trial within the meaning of Section 182, L. O. L., and within the meaning of the term “trial” as it is expressly defined in Section 113, L. O. L. In the opinion of the writer the state cannot, because of its status as a sovereign, be compelled to continue the litigation against its will; and consequently it is utterly immaterial whether the decision upon the demurrer was or was not a trial within the meaning of Sections 182 and 410, L. O. L., and it is likewise immaterial whether the answer does or does *212not contain a counterclaim within the meaning of Section 182, subdivision 1, L. O. L.
The State of Oregon is a sovereign and because of that fact cannot be sued in its own courts without its consent. Indeed, the state can withdraw its consent after it has once given it: State ex rel. v. Jumel, 38 La. Ann. 337, 339. So puissant is the state and so completely immune from attack in its own courts is the sovereign state that it can withdraw its consent and by that act alone terminate a pending suit against it although such suit was originally begun with the express consent of the state. This doctrine finds concrete illustration in Beers v. State of Arkansas, 20 How. 527 (15 L. Ed. 991). An action was brought in a Circuit Court of the State of Arkansas to recover the interest due on certain bonds issued by the state. The state Constitution empowered the legislature to provide by law “in what courts and in what manner suits may be commenced against the state.” In pursuance of that provision of the Constitution a law was passed permitting the prosecution of suits against the state. Acting upon the faith of that law the action was begun in the Circuit Court on November 21, 1854; but afterwards on December 7, 1854, while the action was still pending in the Circuit Court, the legislature passed a statute providing that in all suits brought to enforce the collection of any bonds issued by the state such bonds should be filed in the office of the clerk and upon failure to file the bonds at a designated time the court was. required to dismiss the suit. The holder of the bonds involved in the suit against the State of Arkansas refused to file them and thereupon the suit was dismissed. In the course of its opinion the Supreme Court of the United States used this language:
*213“It is an established principle of jurisprudence in all civilized nations that the sovereign cannot be sued in its own courts, or in any other, without its consent and permission; but it may, if it thinks proper, waive this privilege, and permit itself to be made a defendant in a suit by individuals, or by another State. And as this permission is altogether voluntary on the part of the sovereignty, it follows that it may prescribe the terms and conditions on which it consents to be sued, and the manner in which the suit shall be conducted, and may withdraw its consent whenever it may suppose that justice to the public requires it.”
Again, in the same opinion the court said:
“Nor can this court inquire whether the law operated hardly or unjustly upon the parties whose suits were then pending. That was a question for the consideration of the legislature. They might have repealed the prior law altogether, and put an end to the jurisdiction of their courts in suits against the state, if they had thought proper to do so, or prescribe new conditions upon which the suits might still be allowed to proceed.”
The broad doctrines announced in Beers v. Arkansas are recognized and followed in State v. Bank of Tennessee, 62 Tenn. (3 Baxt.) 395, 399, 406.
The Code provides that in addition to denials the answer may contain “a statement of any new matter constituting a defense or counterclaim” (Section 73, L. O. L.); and the Code also states that—
“The counterclaim mentioned in Section 73 must be one existing in favor of a defendant, and against a plaintiff, between whom a several judgment might be had in the action * * Section 74, L. O. L.; Section 395, L. O. L.
In section 401, L. O. L., we read:
“The counterclaim of the defendant shall be one upon which a suit might be maintained by the defendant against the plaintiff in the suit.”
*214A counterclaim in equity must be connected with the subject of the suit and contain such an averment of facts as to authorize the defendant to maintain a suit thereon against the plaintiff: Le Clare v. Thibault, 41 Or. 601, 606 (69 Pac. 552); Templeton v. Cook, 69 Or. 313, 317 (138 Pac. 230). Affirmative matter pleaded in an answer may be either defensive or offensive or both defensive and offensive: Griffin v. Jorgenson, 22 Minn. 92, 95; Haaland v. Miller, 67 Or. 346, 350 (136 Pac. 9). If the answer is defensive only and does not ask for affirmative relief a dismissal of the complaint carries with it the answer and suit; but if the answer contains a counterclaim within the meaning of the Code a dismissal of the complaint, as distinguished from a dismissal of the suit, does not carry the answer with it, for the reason that a mere dismissal of the complaint leaves the case to be determined upon the counterclaim: Maffett v. Thompson, 32 Or. 546, 551 (52 Pac. 565, 53 Pac. 854); Tokstad v. Daws, 68 Or. 90 (136 Pac. 844). A counterclaim then, within the meaning of our Code, is in effect a suit prosecuted by the defendant against the plaintiff.
Turning now to the answer filed by the Pacific Live Stock Company, it will be seen that all the affirmative matter operates defensively while some of it serves not only as a defense but also as a counterclaim and to the extent that such new matter is treated as a counterclaim it would, if sustained by the evidence terminate in a decree granting affirmative relief to the company. But a judgment or decree cannot be rendered against the state unless there is an express statute permitting it: People v. Miles, 56 Cal. 401, 402; People v. Dennison, 84 N. Y. 272, 281; State v. Arkansas Brick & Mfg. Co., 98 Ark. 125 (135 S. W. 843, 33 L. R. A. (N. S.) 376). In effect, the state asks that *215it be decreed to be the owner of the land; and so, also, to the extent that the answer is treated as a counterclaim, assuming that a counterclaim is sufficiently pleaded, the company asks that it be decreed to be the owner of the land. Stated in broad terms, a citizen when sued by the state can plead whatever will operate to defeat the claim of the state; but a pure counterclaim cannot be pleaded and prosecuted to a decree or judgment against the state unless the state has given its consent to the rendition of an affirmative judgment for money or an affirmative decree for relief against the state, for the reason that the prosecution of the counterclaim to an affirmative decree or judgment for the defendant would be equivalent to prosecuting a suit against the state: Holmes v. State, 100 Ala. 291, 294 (14 South. 51); Industrial School v. Reynolds, 143 Ala. 579 (42 South. 114); People v. Miles, 56 Cal. 401; State v. Gaines, 46 La. Ann. 431 (15 South. 174); State v. Leckie, 14 La. Ann. 636; State v. Baltimore & Ohio R. R. Co., 34 Md. 344, 374; Auditor General v. Bay County, 106 Mich. 662 (64 N. W. 570); Aplin v. Grand Traverse County, 73 Mich. 182 (41 N. W. 23, 16 Am. St. Rep. 576); People v. Corner, 59 Hun, 299 (12 N. Y. Supp. 936) (affirmed in 128 N. Y. 640, 29 N. E. 147); State v. Corbin & Stone, 16 S. C. 533, 543; Borden v. Houston, 2 Tex. 594; Bates v. The Republic, 2 Tex. 616.
In this jurisdiction the distinctions between actions at law and suits in equity are preserved. The term “counterclaim” as defined by our Code includes not only “recoupment” but also “setoff”: Bliss on Code Pleading (3 ed.), §§367, 370; Krausse v. Greenfield, 61 Or. 502, 508 (123 Pac. 392, Ann. Cas. 1914B, 115); and it is possible that in an action at law a citizen can, when sued by the state, plead a counterclaim amount*216ing to a setoff as well as a counterclaim amounting to a recoupment for the purpose of preventing the state from obtaining a judgment against him, although he cannot on the basis of that counterclaim secure an affirmative judgment against the state. However, it is not necessary to attempt to decide whether the citizen can plead what is technically known as a setoff against a money demand; nor need we endeavor to determine how far a setoff can be used, if available at all.
This is a suit in equity and if the litigation were between individuals the decree as to any given acre of land would either be wholly for the plaintiff or wholly for the defendant or possibly a dismissal and a denial of relief entirely. The court cannot grant the company affirmative relief unless that relief Is based upon its counterclaim, assuming that the answer sufficiently pleads a counterclaim, and the defendant cannot plead such a counterclaim, unless the state has consented to the prosecution of a suit against it. The Constitution expressly provides that—
“Provision may be made by general law for bringing suit against the state, as to all liabilities originating after or existing at the time of the adoption of this Constitution”: Article IY, Section 24.
If it be assumed that the answer contains a counterclaim and if it be further assumed that the assumed counterclaim embraces a “liability” within the meaning of the Constitution, nevertheless the legislature has not enacted any law permitting the prosecution of an action or suit against the state in its own courts; and hence if the state has consented at all it is only an implied consent derived from the fact that the state itself began a suit. Although the state cannot be sued without a law permitting such suit, yet no statute is necessary to enable the state to institute a suit: State *217ex rel. v. Duniway, 63 Or. 555, 559 (128 Pac. 853); and •while it is true that the state, when it comes into court, must in the main follow the same procedure which an ordinary suitor is required to observe, nevertheless this general statement is subject to the qualification that there is at all times present the fundamental principle that the state cannot be sued without its consent: State ex rel. v. Holgate, 107 Minn. 71 (119 N. W. 792). Immunity from suit is a prerogative right of the sovereign; Sections 182 and 410, L. O. L., are general statutes which do not expressly name the state; and before it can be said that the state has surrendered its high prerogative it ought to be made expressly to appear or at least by clear and necessary implication, that the general statute relinquishes the prerogative: People v. Miles, 56 Cal. 401; People v. Dennison, 84 N. Y. 272, 280; State v. Arkansas Brick & Mfg. Co., 98 Ark. 125 (135 S. W. 843, 33 L. R. A. (N. S.) 376); Raymond v. State, 54 Miss. 562 (28 Am. Rep. 382); Industrial School v. Reynolds, 143 Ala. 579, 585 (42 South. 114); State v. Baltimore & Ohio R. R. Co., 34 Md. 344, 374; Chevallier’s Admr. v. State, 10 Tex. 315. See, also, State Land Board v. Lee, 84 Or. 431, 434 (165 Pac. 372). Nor does the state abandon its sovereign prerogative and impliedly consent to being sued when it institutes a suit in its own behalf: People v. Dennison, 84 N. Y. 272, 282. In most of its important features the case of Moore v. Tate, 87 Tenn. 725 (11 S. W. 935, 10 Am. St. Rep. 712), closely resembles the case presented here; and the reasoning employed here and the conclusion reached here completely harmonize with the reasoning and conclusion reached in that precedent.
The following adjudications give additional support ■to the doctrine that an affirmatively operating judg*218ment or decree cannot be rendered against a state unless permission is expressly given by statute: United States v. Eckford, 6 Wall. 484 (18 L. Ed. 920); De Groot v. United States, 5 Wall. 419, 431 (18 L. Ed. 700); Reeside v. Walker, 11 How. 272 (13 L. Ed. 693); United States v. Warren, 12 Okl. 350 (71 Pac. 685).
This suit was commenced by the constituted authorities of the state and by analogy to the rule applied in Beers v. Arkansas, 20 How. 527 (15 L. Ed. 991), the same constituted authorities may withdraw the suit in the absence of a statute expressly naming the state or at least by necessary implication naming it as one of the parties who cannot be granted a voluntary judgment of nonsuit. The statute which prevents a voluntary judgment of nonsuit before trial or after a counterclaim has been pleaded does not expressly or by necessary implication name the state; and hence there is no statute denying to the court jurisdiction to dismiss this suit. The Constitution delegated »to the legislature authority to consent to the prosecution of suits against the state and the very language of the organic act contemplates express legislation. The legislature has not expressly consented; the Governor and attorney general cannot by their act in bringing this suit impliedly do what the Constitution indicates shall, if done at all, be expressly done by its sole agents for that purpose, the lawmakers.
There are a few adjudications which in varying degrees differ from the conclusion expressed here; but as the writer reads them, those few adjudications fail to give full recognition to the controlling and all-pervading principle that lies at the very foundation of sovereignty.
Of course, if the state institutes a suit in equity and prosecutes it to a finality and the suit terminates in a *219dismissal after a trial on the merits, the state, to the same extent as an individual, would he barred from maintaining a second suit.
The decree of dismissal should be affirmed.