The facts in this case are not disputed. The learned referee who heard and decided it has stated them so fully and accurately in his opinion that they need not be here repeated. We agree with and adopt his conclusions, and need add but very little to his discussion of the law of the case. We are of the opinion that the proposition of the appellants that the judgment in the foreclosure action is conclusive upon the respondent, and cannot be attacked collaterally, cannot be sustained. The supreme court, under the constitution of the state, has general jurisdiction in law and equity, but the exercise of its power is subject to the limitations and regulations of the Code of Civil Procedure. When a person commences an action, the power of the court which he invokes and is entitled to have exercised in his behalf is that only which applies to the cause of action that he states in his complaint, and it is by this pleading that the scope of the power of the court in that action is to be determined. Before jurisdiction can be affirmed to exist, it must appear, not-only that the law has given the tribunal capacity to entertain the complaint against the person or thing sought to be charged or affected, but that such a complaint has been preferred, and that such person or thing has been properly brought before the tribunal to answer the charges therein contained. Sheldon v. Newton, 3 Ohio St. 494.
Under our practice, the power of the court to render a judgment, which in a general way may be termed its “jurisdiction,” is expressly limited by section 1207 of the Code to that demanded in the complaint, or, when there is an answer, to such as is embraced within the issue made by the pleadings. This rule, which" thus limits the power of the oourt to render such a judgment only as is in accordance with the prayer of the complaint, is expressly or impliedly recognized in all the reported cases upon the subject of jurisdiction. Thus, in Lewis v. Smith, 9 N. Y. 502, a judgment in an action to *432foreclose a mortgage was held not to be a bar to an action for dower, for the reason that, although plaintiff was a party defendant to the foreclosure suit, the question as to her dower was not embraced within the allegations of the complaint; while in Jordan v. Van Epps, 85 N. Y. 427, a judgment in an action for partition was held to be a bar to the maintenance of a similar action, for the reason that the plaintiff’s right of dower had been set out in the complaint in the partition suit, and, as the court had capacity to determine it in that action, the plaintiff could have litigated her rights there had she chosen so to do; and the case, therefore, fell within the familiar rule that a judgment is conclusive upon the parties, not only as to the matters actually litigated, but as to matters which might have been litigated within the purview of the original action. In Lewis v. Smith, after stating the rule that a plaintiff must set out in his complaint the facts upon which he claims priority for a mortgage over another incumbrance or special estate in land, the court says: “If he omit to do this, it will be under pain of being obliged to show, when the decree is relied upon collaterally, that the title alleged to be foreclosed was, in fact', subordinate to the mortgage.” Another familiar illustration of the same rule is the effect of a judgment rendered in an action to foreclose a second mortgage upon the holder of a prior incumbrance. Thus, in Jacobie v. Mickle, 144 N. Y. 237, 39 N. E. 66, a judgment was held to bar an.action to foreclose a first mortgage, for the reason that the complaint in the first action set out the prior mortgage, and in the prayer for judgment demanded that the amount due thereon be ascertained and paid out of the proceeds of the sale; and the case is distinguished in the opinion of the court' from those in which prior incumbrances were held not cut off by a sale under a judgment rendered in an action to foreclose a junior mortgage, for tihe reason that the right of the first incumbrancer was not set out in the complaint. An unlimited number of authorities might be cited all holding that the rule that a party is not entitled to a judgment upon matter not embraced in his complaint is jurisdictional. It is not sufficient that a judgment is within the general power of the court, or that it adjudicates upon a matter of which the court has general jurisdiction; it must appear that the proceeding in which it was rendered was one that brings the power of the court into action. If a woman should sue her husband upon a promissory note, and, upon default of answer, the court should grant her a divorce, no. one would claim that such a judgment had any force or validity; and yet it could be argued that the court had jurisdiction of divorces, and the judgment was within its general powers. But the answer to such an argument would be that the power of the court to grant a divorce had not been called into action, and no case had been presented in which it could lawfully be exercised, and the judgment of divorce would be absolutely void. The result would be the same if, in an action upon a note, a judgment was rendered foreclosing a mortgage. The rule could not be otherwise without violating the constitutional provision declaring that no person shall be deprived *433of life, liberty, or property without due process of law. That provision cannot be complied with unless the party proceeded against has a hearing or opportunity to be heard. In Stuart v. Palmer, 74 N. Y. 183, the court of appeals said they could not conceive of due process of law without that. A party could not have an opportunity for a hearing upon a claim not set out in the complaint, and of which he had no notice. He has a right to rely upon the allegations of the complaint served upon him with perfect confidence that no valid judgment can be rendered against him upon any claim or cause of action which has not been pleaded, and, if any such is rendered, it is coram non judice and void.
In the action before us it is the appellants’ claim that the court had power to determine what land was subject to the lien of the mortgage, and its judgment in that regard is conclusive. But, under the operation of the rule stated, the court had no power to-determine that any land was covered by the mortgage, except in accordance with the allegations of the complaint. The plaintiff in the foreclosure action did not allege that the land claimed in this action was subject to the mortgage. She admitted that a part of the mortgaged premises had been released, and, for a description of it, referred to the release by date and place of record, and the complaint must be read as if the release was incorporated in and found as part of it. The plaintiff, however, had a right to rely upon that allegation, and there was no question before the court for its determination as to what the mortgage property consisted of. The facts were found by the court in accordance with the allegations of the complaint, and neither under the pleadings nor its own decision was there any power to direct the sale of the plaintiff’s land; and the judgment, so far as it purported to direct a sale of the land in suit, was void. The judgment appealed from must be affirmed, with costs. All concur.