Dwight, J.
Two days after he issued the summons in this action, the justice, who was an attorney at law, accepted a retainer from the plaintiff to bring an action for him in the supreme court, and proceeded to do so. It was the first time he had ever been employed as an attorney by the plaintiff. He was acting in that capacity when this action was tried. The defendant, having learned of the relation existing between his adversary and the court after the joining of issue, filed an affidavit of the facts on the adjourned day, and asked that the action be dismissed for that reason. The motion was denied, •and the justice tried and rendered judgment in the action. It is said that the *244case showed that the justice was not influenced to the prejudice of the defendant by his relation to the plaintiff; and so it seems to us on the evidence contained in the return. But in this case the justice not only tried the cause, ruled on questions of law and the admission of evidence, decided the case, and made the judgment, but he took the minutes of testimony, and made the return. All these functions were performed by one who stood to the plaintiff in the confidential relation of his attorney in another action, upon a retainer which the plaintiff had tendered to him, and he had accepted, after he had assumed the office of judge between the plaintiff and defendant. There may have been no corrupt intent in offering the retainer. There probably was none in accepting it. But the transaction did not avoid the appearance of evil, and was certain to cause suspicion and distrust on the part of the defendant towards the tribunal to which he was compelled to submit his rights. In O’Brien v. Long, 1 N. Y. Supp. 695, (decided in this court last year,) an order setting aside a referee’s report was sustained upon facts much legs marked than those which characterize this case. There a referee was attorney for one of the parties in two actions, which were referred to the attorney for the plaintiff in the action before him. He reported in favor of the plaintiff, and the report was set aside, though, as the court said, “there was no reason for supposing that the referee was corruptly influenced by the fact,” and the plaintiff himself was wholly ignorant of the relation existing between his attorney and the referee. In this case it was the plaintiff who induced the improper relation by the offer of a retainer to the justice before whom his action was pending." The case of Stebbins v. Brown, 65 Barb. 272, was precisely like this case, except that the judicial officer who accepted the retainer from one of the parties to a litigation pending before him was a referee appointed by the supreme court; and his report was set aside. We know of no reason why the same rule in defense of the purity and exemption from suspicion of the judicial office should not apply to justices of the peace equally with referees. In the case of People v. Suffolk Common Pleas, 18 Wend. 550, the action of a justice of the peace was in question, and a writ of certiorari to review a judgment rendered by him was quashed because the justice himself drew the affidavit upon which the writ was allowed. Judge Bronson, in his opinion, says: “The act complained of was calculated to impair the confidence of the opposite party in the impartiality of the officer, which is, of itself, an evil which should be carefully avoided.” We have no hesitation in affirming the judgment of the county court, which reversed that of the justice, on the ground above stated. All concur. Judgment of the county court, reversing that of the justice, affirmed, with costs.