I. The facts which are not disputed, or are established by preponderance of the evidence, are these: The defendants are husband and wife. The father of the husband gave him eighty acres of land, and the-wife’s father gave her an equal amount adj oining the-husband’s land. There was but little improvement on either tract. A house of little value was upon the husband’s land, which he and his wife occupied until he built a better one on the same tract of land, costing six hundred dollars or eight hundred dollars, with money which he. borrowed from the wife’s father. He borrowed other sums from his father-in-law, which were expended in improving both his own land and his wife’s land,. *663and in paying the wages of his hands employed on his farm, consisting of both his wife’s land and his own. After the death of his wife’s father, who bequeathed to plaintiff the claim upon the husband, he, with his wife, executed to her a new note for his indebtedness to the estate, and a small amount to her for money loaned to him. They also joined in a mortgage to secure these notes, conveying the land of each. Subsequently the plaintiff released from the lien of the mortgage the land of the wife, and now prosecutes this suit to foreclose the mortgage upon the husband’s land alone. He insists that all the property covered by the mortgage, other than the homestead, must be first exhausted before the homestead can be sold, and that, as plaintiff has released the wife’s land, the value whereof is greater than the debt, she cannot subject the homestead to the payment of any part thereof. The decree of the court below is to this effect. The plaintiff and her daughter, defendant’s wife, insist that the wife is to be regarded as a surety for the husband, and it was therefore competent for plaintiff, without prejudice of her right, to subject all of the husband’s land to her claim, to release her daughter’s land, and to look alone to the security of the mortgage upon the husband’s land.
II. Code, section 1988, provides that, “where there is no special declaration of the statute to the contrary, the homestead of every family, whether owned by the husband or wife, is exempt from judicial sale.” Section 1993 declares that the homestead may be sold for debts under these conditions : “ The homestead may be sold for debts created by written contract executed by the persons having the power to convey, and expressly stipulating that the homestead is liable therefor; but it shall not, in such case, be sold, except to supply the deficiency remaining after exhausting the other property pledged for the payment of the debt in the same written contract.” Under this statute the homestead must remain exempt until all other property is exhausted which is pledged for the debt in the same *664written contract. The creditor who takes the security on the homestead, and a surety who gives a lien on his own property, does so in view of this provision, which enters into the contract. The creditor takes security on the homestead, and upon other property owned by a surety, which is intended to be only security for the debtor; but the plain language of the statute declares that such property shall be exhausted before the homestead is sold. The debtor, by entering into the contract, assents to the provision of the statute, and the surety does the like, when he unites in putting a lien upon his property. They both assent to the exemption of the homestead, and that all other property covered by the security shall be sold before the homesteád can be made subject to the debt. They cannot complain that the provision of their contract created by the statute is sustained. The statute giving protection to sureties we have not overlooked. It is to be construed in view of the homestead statute we have cited, and is not to be applied so as to require homesteads to be sold before all other property is exhausted, in violation of that statute. By such a construction, both statutes stand and are operative. The plaintiff in this case, by voluntarily releasing a part of the land mortgaged, cannot ■defeat the beneficent purpose of the statute to secure a home to the family, and cause the home to be sold, which the statute declares shall be exempt. These rules prevail in all cases of sureties for homestead owners. In the case of the wife who becomes the surety for her husband, there are persuasive equities which require her to stand by the contract which the law made for her. She ought not to be a party to an attempt to rob her husband and her family of their home. Her duty to her family demands that she should preserve their home, rather than her individual property. Besides all this, she herself is interested in the home; and it may be presumed that her interests would be better protected by preserving to her and her family a homestead, rather than other lands owned by her of equal value. These considerations lead us to *665the conclusion that the husband and his family ought to hold his homestead exempt from plaintiff’s claim. 'The decree of the district court is Aeeirmed.