This case was decided at a former term of this court, and is reported in 13 S. D. 595, 83 N. W. 687. A pétition for a rehearing was granted, upon the ground that the court failed in its former opinion to consider an important point made in appellant’s brief, and the case is now before us on the rehearing.
*53It is contended by appellant that under the counterclaim and prayer thereto of the defendant, Flavin, he was not in any event entitled to be adjudged the owner of the premises, but only to a judgment for a lien upon the premises for the amount due him, and that by proceedings had in the court below upon the trial the time for plaintiff to redeem from said judgment was extended, and hence the judgment should have been that defendant have a lien upon the premises for the amount due upon his judgment, and that plaintiff should have a right to redeem the same from the sale under the judgment. We are of the opinion, upon a review of the case and of the proceedings had in the court below, that the appellant is right in this contention. In the prayer of the counterclaim for relief on the part of the defendant, he only asks that his claim may be “adjudged a valid and existing lien upon said real estate, and that said lien be adjudged superior to the right title, or interest of this plaintiff herein.” The sale of the premises under the judgment had been made prior to the commencement of the trial of the action, but upon such trial the defendant asked for a continuance, on the ground that he was not fully prepared for the trial, and the same was granted. The order made by the court as a condition of the continuance on December 7, 1896, after reciting the continuance and reasons therefor, ordered that an injunction be granted restraining the defendant from selling, or in any manner disposing of, the certificate of sale mentioned in the answer, and from applying for, receiving, claiming, or demanding, by virtue of said certificate, a sheriff’s deed to the real property described in the complaint, until the further order of the court specially made permitting the same. The case was not tried until the following December, and findings of fact and conclusions of law were not filed until the 10th day of March, 1898. In the judgment entered on the *5414th day of March, 1898, it was by the court ordered, adjudged, and decreed that the defendant was entitled to a sheriff’s deed to said premises, and the said sheriff was thereby directed to execute and deliver to said defendant such deed, pursuant to the sheriff’s certificate of sale named in the findings of fact, and that said deed should vest the defendant with the title in fee simple to said real estate, and the whole thereof, and adjudged the plaintiff’s claim invalid as against the defendant.
We are of the opinion that, in view of the claim made in the prayer of his counterclaim, and the delay in the trial caused by the defendant, and the conditions on which the continuance was granted the judgment was clearly erroneous. The time for redemption having expired while the case was in court, and before it made its findings of fact, conclusions of law, and judgment, it was manifestly improper for the court to perfect the title in the defendant, by decreeing him entitled to a sheriff’s deed, which would have the legal effect to bar the plaintiff from redeeming the property. It was the duty of the court, therefore, to have protected the plaintiff’s rights by continuing the injunction against the defendant. The plaintiff in the case has clearly succeeded to the rights of William Muller, Jr., under the deed from Muller, Sr., to Mrs. Kirk, and from her to the plaintiff, and is entitled to retain the legal title as against the defendant, subject to defendant’s lien on the execution sale under his judgment, as this was all that the defendant asked under his counterclaim, and all that he was entitled to under the facts of the case. The judgment of the court, therefore, adjudging the plaintiff’s title to be quieted as against all claims, demands, or pretensions of the plaintiff, and all persons claiming under him, was clearly erroneous. It granted to the defendant relief which, under the peculiar circumstances of this case, he was not entitled to, and to *55which he made no claim. The judgment of the circuit court is therefore reversed, and that court is directed to enter a judgment giving to the defendant a lien upon the premises for the amount due him upon his judgment, and vacating and setting aside the sheriff’s deed executed to the defendant, and granting to the plaintiff a reasonable time in which to redeem from such sale by paying the amount of the judgment and costs of sale, with interest to the time of the trial; and, in default of redemption within the time specified, the defendant shall be entitled to take his sheriff’s deed. The former opinion of this court is hereby modified, as expressed in this opinion.