If the question were res nova in this jurisdiction, I should hold that, where a party executes a bond, as did this plaintiff, contemporaneously *547with the builder’s contract, the very object and purpose of which was to secure the owner of the property against such a claim as this set up by the plaintiff, and on the faith of which the owner of the property had paid off the contractor and other materialmen to the full amount of his contract price, the obligor in such bond would be clearly estopped from asserting such lien. It is, in legal effect, a guaranty on his part to the owner that no lien shall be filed against the owner’s property, as no such lien would ever arise where the contractor pays for the material as he was required to do by his contract. But the rule seems to be otherwise in this state. In Hartman n. Berry (56 Mo. 487), followed in Hayden v. Wulflng (19 Mo. App. 354), it is held that the mere fact that the lienor has executed such bond of indemnity does not prevent the obligor from filing and enforcing such lien against the property of the obligee. But these courts have never held, as I am aware of, that, where the contract and bond have been broken, there was no mode of defence open to the owner of the property, when sued by the subcontractor to enforce the lien, to enable him to have the benefit of the bond before the obligor could sell him out of house and home on a judgment, against which the obligor had covenanted to protect the owner. A close examination of the decision in the Hartman ease will make it clear that the court meant to hold no such doctrine. On page 491, the court say: “From the face and tenor of the bond given to Bates it is manifest that its only object was to secure her in the payment of the money loaned to Griswolds, for which the deed of trust was executed. The object was, that the deed of trust might not be swept away by liens filed under the mechanic’s lien law. There is no allegation in the answer that Bates was injured, .or if injured, to what extent. The bond itself would not operate as a bar or estoppel against filing liens. If Bates lost her money, or any part thereof, by reason of such liens being filed, the damage so sustained might have been set up as a-*548counter-claim, or if her lien was about to be enforced by the sureties in the bond, which endangered her debt, she might perhaps enjoin the collection till her debt was paid. ”
There is, however, something more in the answer of defendant than the allegation of the execution of the bond by plaintiff as surety. There is an express plea of damnificatum. It is alleged that the contractor had not kept his contract; that he abandoned it before its completion, to defendants’ damage; that he had not protected it against mechanics’ liens, whereby defendant had paid out more than the contract price, to-wit, $156.29 ; for unfinished work, seventy-five dollars ; delay in finishing said work, seven hundred and fifty dollars, and the like. If these facts were true, there existed in favor of the defendant, at the time of filing his answer, a cause of action against the plaintiff on his bond, although it may be said it was merely a bond of indemnity, because the defendant had suffered loss and damage, against which the plaintiff had undertaken to indemnify him. Jones v. Childs, 8 Nev. 121; Belloni v. Freeborn, 63 N. Y. 384; Tankersly v. Anderson, 4 Des. 43; Carman v. Noble, 9 Pa. St. 371.
The Hartman case holds that the very moment the plaintiff brought this action, even without a judgment, he became liable on his bond for the amount. In Trustees v. Heis & Co. (44 Md. 455), the action was brought on the equity side of the court to enforce a mechanic’s lien; the practice there requiring such actions to be brought on the chancery side of the court. The plaintiff had given to defendant, owner of the-property, a bond of indemnity, as here. The court said it would be grossly inequitable to allow the claimant, the obligor, to proceed to the enforcement of his lien, and the possible sale of the church property, in the-very face of his bond that no such lien should exist. In that case there does not appear to have been any other breach of the contract than the suffering of the lien in question to be placed upon the property. So the court,. *549In the exercise of its equity powers, held that the trial court should have stayed the foreclosure proceedings, and retained the bill until such time as the defendant might bring an action at law on the bond, and should he recover thereon, he could plead the amount of the judgment as an equitable setoff against the claimant’s claim. But under our practice act I can see no reasonable objection to the defendant’s right to avail himself of the defence as a counter-claim, or by way of recoupment. The court in the Hartman case {supra) expressly say that the damages could be pleaded by way of counter-claim. And this course was pursued, unchallenged by the parties, in McConey v. Wallace (20 Mo. App. 377). In Winder v. Caldwell (14 How. [U. S.] 434) the court say: “It is well settled, that a total or partial failure of consideration, acts of nonfeasance or misfeasance, immediately connected with the cause of action, or any equitable defence arising out «of the same transaction, may be given in evidence in mitigation of damages, or recouped ; not strictly by way of defalcation or setoff, but for the purpose of defeating the plaintiff’s action, in whole or part, and to avoid circuity of action.” It does seem to me that it would be a most useless and meaningless formula, to permit this plaintiff to enforce his lien against the defendant’s property, collect his money to-day, and then to-morrow allow the defendant to turn around and 'sue the plaintiff to recover back the very money paid over to him the day before. It was among the more important remedies sought to be furnished by the code of practice to obviate just such circuity of action, by permitting the parties, in one and the same action, to adjust and determine all their respective rights and claims connected with, and growing out of, the subject-matter of the action. See Kamerick v. Castleman, 23 Mo. App. 486. The contract for the building of this house and the execution of the bond of indemnity were simultaneous acts, parts and parcels of the same transaction. The very claim which the plaintiff is seeking to assert against the defendant’s *550property grows out of a breach of the contract, which the bond undertook to protect the defendant against. His recovery, therefore, would be in the face of his indemnity, on the faith of which the defendant had paid over to the contractor, and other materialmen, the whole contract price.
The instructions given by the court, although subject to some verbal criticism, perhaps, and might have gone further and been made to apply to the damages already sustained by the defendant as a measure of recoupment or counter-claim, yet, the jury, under the instructions, did find the fact to be that the defendant had wholly performed the contract on his part, by paying out the whole contract price for the work done and materials furnished for the building, and that this claim is for an excess over and above the contract. Why, then, should the plaintiff recover, when the very sum thus asked for was a breach of his bond, and which he must return to the defendant, for so it is “nominated in the bond.”
The judgment was for the right party, and, the other judges concurring, it is affirmed.