This appeal is from an order sustaining a demurrer to the answer on the ground that it fails to state a defense. Defendant having elected to stand on his 'answer, judgment was rendered in favor of the plaintiff, from which the defendant appealed.
*436The following facts are admitted by the demurrer: In September, 1882, Joseph Parszyk, who owned a quarter section of land in Yankton county, executed and delivered a warranty deed purporting to convey the same to Annie Mach, plaintiff in this action. The deed, having been duly acknowledged, was recorded October 3, 1882. In November, 1896, Parszyk commenced an action to have the deed canceled, alleging in his complaint that when it was executed he was of unsound mind and wholly incapable by reason of his mental derangement of performing any act of business, that he had subsequently been restored to mental capacity, that prior to the commencement of the action he offered to restore everything of value received at the time of the conveyance, that such offer was rejected, and that the defendant therein refused to> reconvey the land. He demanded judgment “that the warranty deed from plaintiff to defendant be delivered up for cancellation, and that the said deed be duly canceled of record by the register of deeds of said county, and for such other and further relief as may be just and equitable, besides the costs of this action.” The summons was personally served upon Annie Mach in Yankton county. On January 23, 1897, she having made default, a judgment was entered wherein it was ordered, adjudged, and decreed that the deed from Parszyk to her “be, and the same is hereby, canceled, and the title to the -said described property be, and it is hereby, confirmed in the plaintiff, Joseph Parszyk, and the register of deeds of Yankton county, South Dakota, is hereby authorized and directed to cancel said deed of record; and is is further ordered that the defendant, Annie Mach, and all persons claiming by, through^ or under her, be, and she and they are hereby, forever barred and enjoined from asserting any right, title, or interest of whatsoever kind to said property.” On January 29, 1897, after this judgment had been duly re*437corded in the office of the register of deeds, Parszyk borrowed $800 of'the defendant, Blanchard, giving as security a mortgage on the land in controversy, which was recorded on the same day. On the following day Annie Mach, by her attorneys, served upon the attorneys for Parszyk a notice of motion to vacate the default judgment and for leave to serve and file an answer. This motion coming on for hearing on March 23, 1897, it was ordered that the default be opened and that the defendant, be allowed to serve and file an answer. An appeal having been taken tp this court, the order opening the default was affirmed. Parszyk v. Mach, 10 S. D. 555, 74 N. W. 1027. On December 1, 1898, a judgment was entered on motion of the plaintiff, Parszyk, dismissing the action without prejudice and awarding the defendant her costs and disbursements. In the meantime the land had been sold under and by virtue of the power of sale contained in the mortgage, and a certificate of sale issued to the mortgagee, the defendant in this action. After the former action was dismissed, the present action was commenced, for the purpose of having defendant’s mortgage declared to be void and of no legal effect.
If Parszyk was a person entirely without understanding when the deed to plaintiff was executed, title to the land in controversy was not conveyed from the former to the latter. Comp. Laws, § 2519. If he was then a person of unsound mind, but not entirely without understanding, his incapacity not having been judicially determined, the title passed, subject to rescission. Id. § 2520. If Parszyk belonged to the first-mentioned class of persons, the «title was in fact in him when the mortgage was executed, independently of the default judgment. While record evidence of a transfer- may under certain circumstances be conclusive, the recording of an instrument or judgment affecting real property in the office of the *438register of deeds does not of itself transfer the title. In this state there may be a valid transfer as between the parties thereto and those having. notice thereof, by means of an' unrecorded instrument. Comp. Laws, § 3297. Although purchasers of the plaintiff for value and without notice might have been protected by the record evidence of the transfer from Parszyk to her, as between the parties to the warranty deed, there was no transfer in fact, if Parszyk was a person entirely without understanding when that instrument was executed. Howe,ver, no1 issue is raised by the answer as to Parszyk’s mental condition in fact; the defendant basing his rights alone upon the existence of the default judgment when his mortgage was executed. As his counsel has argued the case upon the theory that the judgment operated to transfer the title from the plaintiff to Parszyk,, it will.be assumed that the deed from Parszyk to the plaintiff conveyed the title, subject to the former’s right of rescission. We will also assume that the- judgment revested title in Parszyk, and proceed to consider what, if any, effect its vacation had upon the mortgage executed after it was entered and before the default was opened by order of the circuit court. The judgment was either regular, erroneous, or void. If it was void it was ineffectual for any purpose, and defendant could derive no title through it. . If it was merely erroneous, or if it was in all respects regular, assuming that title can be transferred by the mere entry of a judgment, defendant’s rights under the mortgage are unassailable, unless affected by the subsequent proceedings in the action wherein the judgment was rendered. Was the judgment void? The court had jurisdiction of the parties. It had authority to hear and determine actions for the rescission of contracts and conveyances made by persons of unsound mind; and the complaint stated facts sufficient to constitute a cause of action. Parszyk v. Mach, supra.
*439It is contended, however, that the judgment was void, for the reason that it granted relief not demanded in the complaint. In the decision on the appeal from the order opening the default, this court said “that, while the complaint states a cause of action, no substantial relief was demanded; and there being no answer, nothing in excess of the prayer could be granted. In order to sustain a judgment by default under section 5097, supra, although the pleader has stated facts that are actionable, the relief granted must not exceed what was demanded. Simonson v. Blake, 20 How. Prac. 484; Bullwinker v. Ryker, 12 Abb. Prac. 311. That the decree in this instance grants relief not demanded is so> clear' that further comment would be wholly gratuitous.” It was further decided— the only question necessarily involved in the appeal — that the circuit court did not abuse its discretion in opening the default. Parszyk v. Mach, supra. This court having evidently assumed that it was dealing with a direct attack, its decision cannot be construed as" authority for holding that the judgment was void. In New York, Iowa, California, and Wisconsin, under statutes relating to demands for relief and relief in default cases substantially, if not identically, the same as those in this state, the courts of last resort have held' tha.t, where the defendant has not answered- and the judgment grants relief not demanded in the complaint, the judgment is not on that account void, but only erroneous, and.it cannot be assailed in a collateral proceeding. Harrison v. Trust Co., 144 N. Y. 326, 39 N. E. 353; Ketchum v. White, 72 Iowa, 193, 33 N. W. 627; Bond v. Pacheco, 30 Cal. 530; Chase v. Christianson, 41 Cal. 253; Jones v. Jones, 78 Wis 446, 47 N. W. 728. The same .conclusion was, in effect, reached by this court in McArthur v. Southard, 10 S. D. 566, 74 N. W. 1031. And this court has held in a.criminal action that, where the court below has jurisdiction of the person and *440of the offense, the imposition of a sentence in excess of what the law permits does not render the judgment void. In re Taylor, 7 S. D. 382, 64 N. W. 253, 45 L. R. A. 136, 58 Am. St. Rep. 843. Our' conclusion is that the judgment in Parszyk v. Mach was erroneous, but not void, and that it cannot be assailed in this action. This view is supported by abundant authority and is consonant with sound reason.
The judgment being erroneous, but not void, and having been entered when defendant’s mortgage was executed, the consequences of its subsequent vacation or reversal in the due course of litigation remain to be considered. Though it was not vacated by the order opening the default, the dismissal of the action operated to set it aside. The default was opened within the time allowed by law, and such further proceedings were had that the judgment ceased to exist. The action terminated in favor of the defendant. There was, in effect, a reversal of the judgment in due course of legal procedure, subsequent to the execution of defendant’s mortgage, and the question arises, what was the effect of such reversal upon the rights of the mortgagee? It certainly will be conceded that whatever rights to the mortgaged property were conferred on the mortgagor by the judgment were, as to him at least, restored by its reversal. Nearly all the authorities hold that, where the plaintiff purchases the property of the defendant, at a sale under a judgment or decree, his title will be defeated by subsequent reversal. It is also a rule nowhere disputed that third persons, purcasing at a sale made'under the authority of a judgment or decree, not suspended by any stay of proceedings, thereby acquire rights which no subsequent reversal of such judgment or decree can in any respect impair. Freem. Judgm. §§ 482, 484. The latter rule rests on grounds of public policy. It is intended to encourage bidding at *441judicial sales, and thus protect defendants from having their property sacrificed at nominal prices. Had Parzyk obtained a money judgment, and defendant purchased plaintiff’s property at a sale under an execution issued thereon prior to- the opening of the default the subsequent dismissal of the action would not have affected his rights. In that case defendant’s purchase would have been made while the action was pending, and liable to be vacated or reversed m the usual course of procedure. He would be protected, not because he was without notice of the pendency of the action, or notice that proceedings had been or would be taken to reverse the judgment, but because rights acquired by judicial sales are protected in the interests of those whose property is thus conveyed by operation of law. Defendant’s position as mortgagee cannot be regarded as more favorable than that of a purchaser. There was in this case no judicial sale. “An action is deemed to be pending from the time of its commencement until its final determination upon appeal, or until the time for appeal has passed, unless the judgment be sooner satisfied.” Comp. Laws, § 5343. This is a general provision of the law of civil procedure. Its language is plain.' Had the legislature intended that civil actions should be deemed to- be pending during the period mentioned for certain purposes only, it would have so expressed itself. Defendant was bound to know; the law. He was bound to know that the judgment upon which his mortgagor’s title depended was liable to be vacated or reversed in the authorized course of civil procedure. One who purchases a judgment takes it at the peril of having it vacated or reversed. Why should the deiendant in this action stand in any better position than the assignee of a money judgment? The reason for the rule which protects purchasers at judicial sales cannot be invoked. “When the reason for a rule ceases, so should the rule itself.” Comp. Laws, § 4697. As*442suming that the judgment was self-executing, and operated as a conveyance — a proposition not free from debt in this states — it certainly did not vest an indefeasible title in Parszyk. His rights rested upon a pending action, and we can discover no reason for holding that the defendant acquired any rights superior to those of his mortgagor. It is.no greater hardship for defendant to lose his security than it would be for the, plaintiff to lose her land. Her failure to defend before the opening of the default has been adjudged excusable. Defendant may have been ill-advised as to the law, but that was not the fault of the plaintiff. It may be proper to add that defendant did not act upon the advice of his present counsel, and that persons of ordinary prudence do not usually make real estate loans under the circumstances disclosed in this case.
As heretofore suggested, decisions involving judicial sales are not applicable to this appeal. Therefore many authorities cited by appellant’s counsel require no consideration. It was held in Nebraska that where a district court enters a decree quieting title to real estate in a party to the action, and such party sells and conveys it to an innocent third person for a valuable consideration, and after-wards the decree, not having been superseded by bond, is reversed in the appellate court, such purchaser will not be affected, by the reversal. Parker v. Courtnay, 28 Neb. 605, 44 N. W. 863, 26 Am. St. Rep. 360. The opposite conclusion was reached by the supreme court of Minnesota in an opinion wherein the reason of the rule which protects purchasers at sales made under executions of judgments is stated with accuracy and clearness, and wherein it is shown that such rule has no application to persons who purchase from the plaintiff in actions to quiet title. Lord v. Hawkins, 39 Minn, 73, 38 N. W. 689. The Nebraska decision will be found to rest largely upon an early Ohio case strikingly analogous to the one at bar. It was there held *443that the decree in an action to obtain a conveyance of certain land operated as a conveyance, subject, as between the parties, to a re-vesting of the title by a reversal, and that, the plaintiff having conveyed before citation of error was served, a reversal did not devest the purchaser’s title. Concerning the second proposition the court said: ‘‘But the most difficult and important point in this case is as to the effect the reversal is to have upon the rights of third persons, legitimately and innocently acquired. After the time limited in the decree itself had transpired, and the decree became an absolute title, the party thus invested .with title and in possession of the land sold and conveyed it to a third person, who stands before the court as an innocent purchaser for a valuable consideration without notice. Can his rights be devested by a reversal of the decree upon which his title was originally founded? We are of opinion that they cannot be so devested. When James Boyd conveyed to Abraham Boyd, he had a complete title, which it was competent for him to transmit by conveyance in the usual mode. In making this conveyance he devested himself of title, and invested it in Abraham Boyd, the defendant, who reposed himself upon the solemn and final decree of a court of competent jurisdiction, then in full force and of unquestionable validity. By this act of conveyance, made in good faith, James Boyd put an end to his power over the land. He could not resume his interest in it without the consent of his grantee, and no decree subsequently made in the suit, or in any new suit growing out of it, against James Boyd, could affect an interest which he had not in the subject. This consequence, upon the premises here assumed, seems to be conceded by the counsel for the plaintiff. But he argues that the conveyance cannot be treated as one made in good faith, because, as he insists, it was made pendente lite. If this position be correct, the result contended for necessarily follows; for a *444conveyance of a subject in litigation, made pending the litigation, is universally treated as made in bad faith, and as universally held not to change the rights of any of the parties.” Taylor’s Lessee v. Boyd, 3 Ohio, 338, 17 Am. Dec. 603. The court then discussed the contention that a writ of error is but a continuance of the original suit, and reached the conclusion that it is itself 'a new and original proceeding, which can only affect parties or strangers from the service of the citation. If the action wherein the decree was rendered had been “deemed to be pending” when the property was conveyed to the purchaser, the court could not, in harmony with its own reasoning, have decided in his favor. As has been shown, the ParszykMach action was pending when the defendant’s mortgage was executed. Read.in connection with our statutes defining'the pendency of actions and our appellate procedure in civil actions, the Ohio decision sustains the view heretofore taken of the rights of both Parszyk and the defendant. The following cases are to the same effect— the purchaser being protected because the judgment was reversed on writ of error or bill of review, and therefore the action was not pending: Macklin v. Allenberg (Mo. Sup.) 13 S. W. 350; McCormick v. McClure (Ind.) 39 Am. Dec. 441; Rector v. Fitzgerald, 8 C. C. A. 277, 59 Fed. 808; Ludlow’s Heirs v. Kidd’s Ex’rs, 3 Ohio 541.
We think the learned circuit court did not err in sustaining the demurrer to defendant’s answer, and its judgment is affirmed.
Corson J., dissents.