The plaintiff brought action to enforce a mechanic’s lien for lumber sold and delivered to the defendant Foote. The defendant counterclaimed for fraudulent representations as to the quality of the lumber, by which he claimed to have been damaged. The reply was practically a denial of the facts alleged in the counterclaim. Upon the trial the plaintiff moved to strike out the counterclaim because another action was pending by defendant against the plaintiff involving the same claim, and offered the record of such action in evidence. The record ivas objected to as incompetent and immaterial, and because no such matter was pleaded, but the objection was overruled, and the record received, and the counterclaim stricken out; and judgment was thereupon rendered for the plaintiff.
The action of the court in receiving the record of the other action, when no such defense was pleaded, was plainly error. The defense of prior action pending is an affirmative defense and must be pleaded if there be an opportunity to plead it. For this error there must be a new trial.
' By the Court.— Judgment reversed, and action remanded for a new trial.