delivered the opinion of'the court.
Appellant being tbe owner of a tract of land on which he resided with his family, sold for $1,000 a portion thereof, including the dwelling and other improvements, delivered possession to the purchaser, and rented premises some two miles therefrom. During his occupancy of the rented property he commenced the erection of a dwelling-house on the unimproved portion of the land belonging to him, with the avowed intention to make it his home. While these improvements were being made he mortgaged this land, the wife not joining, to appellee, and shortly afterward moved into the house and continues to occupy it as a home for himself and family. Appellee brought this action to subject the property to the payment of the mortgage-debt. Appellant answered, claiming a homestead, which the court refused to allow, and directed the sale of so much of the property as might be found necessary to. satisfy the claim, and also gave personal judgment against appellant.
The homestead-law is for the benefit of all bona fide housekeepers with a family, but does not apply to sales under execution, attachment, or judgment, at the suit of creditors, if the *212debt existed prior to the purchase of the land or to the erection of the improvements thereon.
In this instance the land was purchased before the debt was created, but a part of the sum of money which the mortgage was executed to secure, was applied by appellant in payment for the land. The improvements, though in process of construction, were not completed or occupied by appellant until some six weeks after the date of the mortgage.
In Brown v. Martin, 4 Bush, 50, it is said that the right of exemption depends upon the present, or actual purpose and intention of the debtor to use and,enjoy the property sought to be exempted as a home for himself and family. The question did not arise then, however, as to whether the intention of the debtor to establish his residence upon certain premises, which had not been previously occupied by him as a home, would entitle him to the exemption.
We are of the opinion that when there has been an occupancy, and a removal temporarily, with the intention to return and make the premises a home, there would be no forfeiture of the homestead; but where there never has been an actual residence and use of the property as a home, a mere.intention to so occupy it at some future time will not be sufficient to protect the homestead. Any other construction of the statute would render it an instrument of fraud, and defeat its manifest object. Before a party will be entitled to the exemption he must bring himself within the spirit of the statute.
In this state, in the cases where the question of intention has become an element in the determination of the right to a homestead there has been a‘previous occupancy and use as a homestead. In order to determine whether ‘ there has been an abandonment of such right of exemption the intention is properly inquired into, but it is not the spirit of the statute that intention should create the right to • a homestead. The judgment of the lower court upon this point is correct.
*213Appellant complains of the personal judgment rendered against him, because he says there is no prayer in the petition for such relief. The prayer is, “Wherefore plaintiff prays that the mortgage be foreclosed, and for all other proper relief.” Section 90, Civil Code, provides that “ if no defense be made, the plaintiff can not have judgment for any relief not specifically demanded; but, if defense be made, he may have judgment for other relief, under a prayer therefor.” As setting up claim to the homestead was not a defense to the action, it is clear that the court erred in rendering the personal judgment.
Wherefore so much only of the decree of the lower court as gives personal judgment is reversed, and cause remanded with directions to set aside that portion.