
    Samuel A. Stephens, et al., v. George W. Ballou.
    Occupying-Claimant Law; Improvements. Where A. brought an action in the district court against B., the patentee of certain lands, to enforce a parol contract concerning the purchase and conveyance of said land, made in violation of the spirit of the laws of the United States, and in fraud thereof, and in the court obtained a judgment compelling the execution of a deed of conveyance of the land to himself, and the sheriff complies with the order of the court, and executes a deed reciting therein the judgment, and A. enters upon and takes possession of the land thereunder, and makes lasting and valuable improvements thereon, before proceedings are commenced in the supreme court to reverse the judgment, held, that although the judgment is afterward reversed by the supreme court, and A. is finally defeated in his action, that he is entitled under the provisions of the occupying-claimant law to recover for the improvements made on the land.
    
      Error from, Cowley Distriot Court.
    
    EjectmeNT, brought by Samuel A. Stephens, and J. Jay Buck and L. B. Kellogg, partners as Buck & Kellogg, to recover the north half of the northwest fractional quarter of section five, in township thirty-two, south, of range seven, east, situate in Cowley county. Trial at the May Term, 1880, of the district court, and judgment that the plaintiffs are entitled to the possession of the land aforesaid, subject, however, to the rights of the defendant as an occupying claimant. The plaintiffs bring the case to this court. The opinion states the facts.
    
      J. Jay Buck, and L. B. & J. M. Kellogg for plaintiffs in error.
    
      Soward & Asp, for defendant in error.
   The opinion of the court was delivered by

HortoN, C. J.:

This was an action in the nature of ejectment, brought by plaintiffs against defendant, in the district court of Cowley county. The only question presented for our determination is, whether the defendant in error was entitled to the benefit of the occupy ing-claimant law. The facts are these:

Under* sec. 12 of the act of congress of July 15th, 1870, certain lands on the Osage diminished reserve could be sold by the United States to actual settlers, and to actual settlers only. Defendant, who was not an actual settler, procured James A. Brake to enter upon the land in controversy and purchase the same from the United States in his own name as an actual settler, the defendant furnishing the purchase-money and all other necessary means therefor. All this was done under a parol agreement between the parties, that as soon as the purchase was complete, Brake should convey the land to defendant, and the defendant in consideration therefor should convey a portion thereof back to Brake. After Brake purchased the land, the defendant offered to fulfill his part of the contract, but Brake refused to convey to the defendant any portion. On May 1st, 1872, a patent issued from the United States to Brake for the land; on May 29th, 1873, the defendant commenced an action against Brake in the district court of Cowley county to procure title thereto; at the July term, 1873, of the court, the demurrer of Brake to the petition of defendant was sustained, upon the ground that it did not state facts sufficient to constitute a cause of action, and the defendant was allowed twenty days from the close of the term to amend his petition. The petition, however, was not amended. At the next term, and on October 29 th, 1873, defendant moved the court to open up the decision and set aside the judgment sustaining the demurrer, which was granted, and upon a new hearing the demurrer was overruled. At the September term, 1874, trial was had in the action, and judgment rendered in favor of the defendant, and the sheriff of Cowley county was directed to make a deed for the land to defendant. The sheriff duly complied with the judgment of the court, and on October 8th, 1874, executed a deed to the land in dispute, reciting the judgment; which deed was recorded October 13,1874. Pursuant to the judgment, and the sheriff’s deed, the defendant entered upon and took possession of the land so conveyed to him, and has resided thereon ever since, and made lasting and valuable improvements. On June 12th, 1876, Brake filed a petition in error in this court to review and reverse such judgment; thereafter, such proceedings were had therein, that at the July term of this court for 1877 the judgment was reversed. (Brake v. Ballou, 19 Kas. 397.) At the May term, 1878, of the district court, a judgment was rendered in favor of Brake against defendant, in pursuance of the mandate of this court. During the pend-ency of the action of defendant, against Brake, and on October 21st, 1873, Brake sold and conveyed to Samuel A. Stephens, one of the plaintiffs, the land, and on January 2d, 1878, said Stephens duly conveyed to J. Jay Buck and L. B. Kellogg, partners as Buck & Kellogg, plaintiffs, an equal undivided one-half thereof.

Upon these facts, we do not think the district court erred in deciding that the defendant was entitled to the benefit of the occupying-claimant law. Sec. 1, ch. 102, Laws of 1873, provides for several classes of cases. The first class is where the occupant is in quiet possession of any lands or tenements for which such person can show a plain and connected title, in law or equity, derived from the records of some public office. This has been held to embrace patents, governors’ deeds, certificates of entry of the public lands, military surveys, and the like. (Beardsley v. Chapman, 1 Ohio St. 119.) A second class is where the occupant, being in quiet possession, holds by deed, devise, descent, contract, bond, or agreement from or under a person of the first class. Now the conveyance executed on October 8, 1874, by the sheriff of Cowley county, had the same effect until annulled or until proceedings had been commenced for that purpose as if executed by Brake, against whom the judgment was rendered. (Code, §400.) Therefore the defendant under such conveyance was within the second class, as he derived his title by deed from an occupant in quiet possession, having a plain and connected title in law derived from the records of a public office. At the time of making the improvements, the defendant was acting upon a judgment and decree of a court of competent jurisdiction, and no attempt was made to challenge such judgment until June 12th, 1876, when the proceedings in error were commenced in this court. We held in Hubbard v. Ogden, 22 Kas. 671, that it would not be in consonance with either justice'or equity to allow a party who had procured an erroneous judgment, and had obtained the property thereundei’, to retain the fruits of the judgment after it had been reversed by this court; but when a party has in good faith taken possession of land upon an erroneous judgment under the circumstances of this case, and made lasting improvements thereon, such possession ought to be a sufficient justification for his recovery as an occupying claimant, because such improvements add to the value of the real estate. He loses, in fact, the fruits of his judgment, but upon the statute, founded in equity, obtains the value of the improvements. The plaintiffs contend that as defendant had not amended his petition prior to the sale of the land from Brake to Stephens, and as his original petition had been adjudged fatally defective, the plaintiff Stephens, and the other plaintiffs as his grantees, had no connection with the action pending by defendant against Brake. This is not correct. Stephens and his co-plaintiffs were bound to take notice of the action pending against Brake, their grantor, concerning this property, and also of the power of the court to permit the pleadings to be changed or amended, and the power of the court to change and set aside its own orders. In other words, Stephens stepped into the shoes of Brake, and neither he nor his co-defendants have any rights to the land in controversy superior to those which Brake would have had if h.e were plaintiff. The fact that the defendant was ultimately defeated in his action against - Brake, is no conclusive argument against his enjoying the benefits of the occupying-claimant law. If he had been successful in the suit commenced by him, he would possess a good title to the land; but having been unsuccessful, he is permitted only to obtain the value of his improvements — he loses the land.

The order and the judgment of the district court will be affirmed.

All the Justices concurring.  