Lee, J.
The pleas tendered by the plaintiff in error appear to be five in number and they were all rejected by the court; and the question here is were they all properly so rejected.
The fifth plea consists of a specification of items and the several amounts thereof, which the party claimed, with a general averment that the defendant in error was indebted to him in the same by way of offset. The items claimed are however' all of an equitable character going to the consideration of the bond sued on, and could not constitute the subject of an offset under the general law of offsets, and the plea fails sufficiently to aver the elements which would constitute a good equitable offset under our statute, nor is it verified by affidavit as the statute requires. It was therefore properly objected to by the court.
The fourth plea avers (by reference to the first) that the bond sued on, was given for the third and last installment of the purchase money of two tracts of land sold by the defendant in error to the plaintiff’, a complete title to which was to be made upon the payment of that installment. It then avers that the plaintiff in error had performed all parts of the contract on his part and had offered to pay the amount of the bond on the defendant’s conveying the property by a sufficient legal title, which he had failed to do ; by reason whereof the consideration of the bond had failed to the extent of two hundred and fifty dollars, for which failure he claimed compensation to that amount.
It is somewhat difficult to determine the exact gist of the plea or the precise scope which the pleader intended to give it. It is not a plea in bar of the action because of the failure of the defendant in error to comply with a precedent or concurrent condition on *745the performance of which or the offer to perform it, only, he would be entitled to his action. Nor is it the plea of a vendee of lands who waives his right to the specific execution of the contract at the hands of a court of equity and goes for complete reimbursement in the form of damages for the vendor’s breach of the contract. For whilst it alleges the purchase of lands at a price of which the bond for five hundred dollars sued on was but the third and last installment, it claims only the sum of two hundred and fifty dollars as compensation for the breach of the contract. It must be regarded therefore that the party is claiming both the right to have the contract executed specifically by a conveyance of the title and also by this plea, compensation for the breach of the contract in the failure to make it. This I apprehend he cannot do. He cannot hold to both rights of action to wit, the one in equity for the conveyance of the title, and the other at law for damages for the breach of the contract in the failure to make it. It has been held upon the construction of this statute that in an action on a bond for the purchase money of land a plea of failure of consideration upon equitable grounds requiring a rescission of the contract and a reinvestment of the obligee with the interest sold to the obligor, is inadmissible. Shiflett &c. v. The Orange Humane Society, 7 Gratt. 297. And, e converso, I think it equally clear that in such an action a plea of failure of consideration by the party’s refusal or neglect to make a title according to his contract and showing that the vendee was entitled to a specific performance of the contract without a plain election to waive such relief and to go for entire damages for breach of the contract, would not be authorized by the statute. The party must make his election; and if he will claim the right to specific execution, he cannot also come with his action or plea under this statute for damages *746generally, for breach of the contract to make the title. Whether in a case in which special damage has been sustained by reason of the vendor’s failure to make the title in due time according to his contract, the vendee may claim compensation in this form, it is not necessary to decide in this case, as nothing of that kind is alleged in this plea, the claim being for compensation, generally, for the vendor’s breach of contract in failing to make the title. I think this plea was not authorized by the statute and was properly rejected.
The first second and third pleas allege the contract for the sale of the two tracts of land and that the bond sued on was given for the third and last installment of the'purchase money, and they aver a partial failure of consideration in the following particulars: the first, that the vendor had never delivered possession of a portion of one of the tenements sold; the second, that he did not deliver possession of either of the tenements sold for two months after the time at which by the contract he was to deliver possession, and the third, that he did not deliver them in the plight and condition in which they were at the time of the sale and in which by the contract he was bound to deliver them, but delivered them in a damaged condition from injuries done or permitted in the mean time to the tenements and freehold. Now possession of the whole subject sold and at the time and in the condition stipulated for in the contract, may fairly and legitimately be considered part and parcel of the consideration moving from the vendee, and if the vendor fail to make good his undertaking in these respects, there can be no reason why the vendee should not be entitled to compensation for the loss thereby occasioned. He does not get all which he stipulated for and for which he promised to pay the agreed price. The diminution in the value of the subject by reason *747of the vendor’s short comings should therefore in some form be made good to the vendee, and I can perceive no good reason why compensation should not be in this form by an equitable plea of offset under our statute. Indeed it seems a very appropriate mode by which the diminution in the value of the thing purchased may be compensated by a correspondent diminution of the price to be paid. There is nothing in the terms of the statute to restrict the plea of equitable setoff to contracts in relation to personalty. The terms of the act are general, “ in any action on a contract,” and it includes contracts by deed as well as by parol, and there can be no reason for excluding all contracts relating to the sale and purchase of real property from the operation. In a case indeed as we have seen where the equitable grounds relied on would require a rescission of the contract and a reinvestment of the vendor with the interest alleged to have been sold, a plea of failure of consideration under this statute could not be relied on. And upon the terms of the statute which authorize the plea in case of a breach of warranty of the title or soundness of personal property, it may be argued that such a plea is inferentially excluded in case of a breach of warranty of the title to real estate.
In Pence, &c. v. Huston's ex'ors, 6 Gratt. 304, this question was raised, but was not decided because the court thought that the matter of the plea showed that the defendant would have been entitled to relief either at law or in equity and constituted a substantial defense to the action. And as the plaintiff instead of objecting to the filing of the plea or demurring, had taken issue upon it and there had been a verdict for the defendant the question whether the defense was authorized by the statute did not arise, the defect, if any, being cured by the act of jeofails. But in this case, the claim is for compensation for a partial fail ure *748of consideration only, and the matters shown in the pleas make no case for a rescission of the contract: in fact they proceed on the assumption that the contract has been in part executed, and in part is yet to be executed, and for a part as to which it has not been and cannot now be specifically executed, compensation is to be made. That the vendee claims to have specific execution by a conveyance of the title constitutes no objection. This is in perfect consistence with the claim for compensation for the failure in those particulars as to which specific performance cannot be had. The vendor is bound to make good his contract in all its parts, and if in any he cannot now perform it specifically, he must make compensation. It will not do for him to say that if he makes the title and the vendee accepts his conveyance the latter thereby waives his claim to compensation for the failure to deliver possession at the time and in the condition stipulated for. In practice it has not been unusual where a vendee comes with a bill for specific execution for the court of chancery to decree the title and also to go on and give an account of rents and profits and for waste done to the inheritance during the time for which the possession was improperly withheld as well as compensation for deficiency in quantity upon the principles of that court, upon the ground that having possession of the subject it will give complete relief and save the necessity of further litigation. And if the correctness of this practice may be successfully questioned (as to which I express no opinion) certainly the vendee may maintain his action at law against the vendor for damages for his breach of the contract; and in either view, where he is sued upon the contract on his part, he may assert his claim against the vendor by plea in the nature of a setoff under the statute. The object of the statute is to save litigation by enabling the parties to settle all the matters in contro*749versy in one suit, and to effectuate this purpose, it should where necessary receive a liberal construction.
No objection can be raised in this case upon the idea that the statute does not authorize the plea in the case of a breach of warranty of the title to real property, as the claim is founded on an executory contract of sale stipulating for the possession of the premises at a certain time and in a certain condition as well as for the conveyance of the legal title, and the alleged breach relates to the possession only and not in any manner to the title.
I think therefore the three first pleas set out in the bill of exceptions although in some respects defective in point of form are yet good in substance and should have been received by the court; and am of opinion to reverse the judgment and remand the cause with directions to permit them to be filed.
The other judges concurred in the opinion of Lee, J.
Judgment reversed.