The complaint alleges that one Grimbel sold and delivered a Bnick touring car to the defendant, and that the defendant agreed to pay therefor the sum of $1,500, and that prior to the commencement of this action Grimbel duly assigned his claim to this plaintiff. The answer admits all the allegations of the complaint, except that Grimbel assigned to plaintiff, and as a counterclaim alleges that Grimbel and defendant made their joint promissory note to one Hilder for $5,000, and that to induce the defendant to sign said promissory note Grimbel agreed that he would indemnify the defendant to the extent of one-half part of everything that defendant paid on said note, and after the maturity of the note and before the alleged assignment by Grimbel to the plaintiff the defendant paid the note, together with $300 interest thereon, and that no part of said $2,600 has been paid to him, and demands judgment dismissing the complaint.
The defendant’s demand against Grimbel was in existence at the time of Grimbel’s assignment to the plaintiff and should have been allowed as a counterclaim to the amount of plaintiff’s demand. Code Civ. Pro., § 502. The contention that defendant should not be permitted to prove the allegations of his answer because of his failure to pay the costs of a prior appeal is without merit. Section 779 of the Code of Civil Procedure has no application to such a case as this, where the defendant asks no affirmative relief and takes no onward step in the action, but acts merely in self defense to a claim urged against him. The counterclaim, not having been pleaded against the original debtor, was available as against the plaintiff as assignee of the original debtor only “ to the amount of the plaintiff’s demand.” Code Civ. Pro., § 502. The counterclaim was available in this action only as a defense and for the purpose of defeating plaintiff’s recovery. The defend*34ant sought to avail himself of the counterclaim only for defensive purposes and not for aggression, and this defense the defendant could not be stayed from proving, merely because of his failure to pay the costs of a prior appeal.
Judgment and order reversed and a new trial ordered, with costs to appellant to abide event.
Guy and Delahy, JJ., concur. '
Judgment and order reversed and new trial ordered, with costs to appellant to abide event.