This is a demurrer to two separate counterclaims set forth under the paragraphs marked 17th and 18th of the defendant’s answer. Each demurrer is interposed on two grounds:
1. That the counterclaim is not of the character specified in section 501 of the Code.
2. That the counterclaim does not state facts sufficient to constitute a cause of action.
Under section 501 of the Code, a counterclaim must tend in some way to diminish or defeat the plaintiff’s recovery and he a cause of action in favor of the defendant against the plaintiff, arising out of the contract or transaction set forth in the complaint as the foundation of the plaintiff’s claim, *248or connected with the subject of the action. This action is not brought upon a contract, and, therefore, the remainder of section 501 does not apply.
This action is brought to recover from the defendant a sum of money sufficient to reimburse the plaintiff for a judgment which was recovered in a negligence action by one Horning against the plaintiff and defendant as joint wrongdoers, and to recover the expenses and disbursements which the plaintiff incurred in defending that action. Homing, the plaintiff in the negligence action, had received injuries from a live electric wire in the streets of Johnstown. He made the plaintiff and defendant in this action defendants in that action, and recovered a judgment holding this plaintiff and defendant liable for his injuries on account of their negligence. The plaintiff in this action at bar now sues, claiming that the defendant was primarily liable for the injuries suffered by Horning; that it was the negligence of the defendant and not of the plaintiff which was the direct and moving cause of Horning’s injuries. Each counterclaim set up as a cause of action by the defendant against the plaintiff is for moneys which the defendant paid to parties who were injured at the same time with Horning, under the same circumstances and by reason of the same negligence, and to whom the defendant paid in the aggregate $9,750, in settlement of actions then pending against this plaintiff and this defendant. Both counterclaims being of the same character, and the facts upon which they are based being the same, a determination as to one counterclaim will be a determination as to the other; and we shall discuss the case as if but one counterclaim were presented. In each counterclaim the moneys were paid by the defendant before judgment, but after the decision of the Court of Appeals affirming the judgment in favor of Homing.
The first question presented is this: Does the counterclaim arise out of the transaction set forth in the complaint as the foundation of the plaintiff’s claim, or out of a transaction connected with the subject of the plaintiff’s cause of action? The plaintiff’s cause of action is this: Homing had recovered judgment against this plaintiff and the defendant as joint defendants in a negligence action. Execution was issued *249upon that judgment and the whole amount of the judgment and costs was collected from the property of the plaintiff. Plaintiff now alleges that the defendant’s negligence was the primary negligence which caused the injuries to Homing, and, therefore, it has a right to recover against the defendant. Defendant in its counterclaim takes this position: An action had been brought by Behrendt against this plaintiff and this defendant. After the judgment in the Homing case had been affirmed by the Court of Appeals, this defendant, in settlement of that action, paid Behrendt $750. The counterclaim further states that this plaintiff was primarily liable for the injuries to Behrendt, who was injured by the same live wire, at the same time and because of the same negligence as injured Horning; and, therefore, this defendant is entitled to be reimbursed by the plaintiff.
The party liable for Horning’s injuries is also liable for Behrendt’s injuries. The transactions or circumstances out of which the cause of action in the complaint and in the counterclaim arose are the same, except that the plaintiff paid one injured party and the defendant paid the other injured party. Under the complaint the plaintiff cannot recover unless it shows that the defendant was primarily liable for Homing’s injuries; and under the counterclaim the defendant cannot recover unless it can show that the plaintiff was primarily liable for Behrendt’s injuries. The two, Horning and Behrendt, being injured at the same time and at the same place and by the same instrument, in order to establish whether the plantiff or the defendant was primarily liable, in either case, will require the same evidence; that is, evidence as to the same facts, conditions and transactions.
I am of the opinion that the counterclaim is directly connected with the subject of the action set forth in the complaint; that is, the facts constituting the plaintiff’s cause of action. Rothschild v. Whitman, 132 N. Y. 472; Hall v. Werney, 18 App. Div. 565.
The plaintiff’s cause of action cannot be proven without disclosing the facts upon which the defendant would maintain its counterclaim, except that the plaintiff has paid its money to Horning and the defendant has paid its money to Behrendt.
*250The plaintiff urges that the counterclaim does not state facts sufficient to constitute a cause of action. I have already passed upon the complaint in this action, upon a demurrer interposed by this defendant; and, for the same reasons given upon that demurrer, I hold that the counterclaim does state facts sufficient to constitute a cause of action.
The demurrer is, therefore, overruled with costs, with leave to the plaintiff of withdrawing its demurrer and replying or otherwise pleading within twenty days after service of the entry of judgment on demurrer.
Demurrer overruled, with costs, with leave to plaintiff to withdraw demurrer within twenty days after entry of judgment.