Crew III, J. Appeal (transferred to this court by order of the Appellate Division, Second Department) from an order of the Supreme Court (Braatz, J.), entered December 5, 1989 in Putnam County, which, inter alia, dismissed the third-party complaint.
Decedent, while in the course of his employment for third-party defendant Putnam Radiator Company, was electrocuted while using an electric drill manufactured by defendant, Milwaukee Electric Tool Corporation. As a result, plaintiff brought an action against Milwaukee for personal injuries and wrongful death. Milwaukee, in turn, commenced an action against, among others, Putnam seeking contribution or indemnification on the theory that the electrocution of decedent was caused by the condition of the latter’s work place and not by the alleged malfunction of Milwaukee’s electric drill.
Prior to trial Milwaukee settled with plaintiff, reserving its rights to proceed to trial against Putnam on its claim for contribution or indemnification. Putnam did not consent to the settlement, but did consent to trial of the third-party claims. At that trial Milwaukee offered proof, through a number of witnesses, to establish that decedent’s death was caused solely by conditions at Putnam’s place of business and not by reason of any malfeasance of its own. Putnam offered *931no proof as to liability and Supreme Court, at the conclusion of the trial, dismissed the third-party complaint. This appeal by Milwaukee ensued.
Milwaukee contends that Supreme Court erred in concluding that it was not entitled to contribution absent a showing that it was, to some degree, responsible to plaintiff. We cannot agree. It has long been the rule that a party who voluntarily settles a lawsuit and pays money before judgment is rendered assumes the risk of being able to prove that he was legally obligated to do so when he seeks apportionment of damages from a third party (Trojcak v Wrynn, 45 AD2d 770). For the same reason, Milwaukee’s argument that it was entitled to indemnity from Putnam fails. Indemnity is founded on the theory that where payment by one party is compelled which another party should have paid, a contract to indemnify is implied by law (Brown v Rosenbaum, 287 NY 510, cert denied 316 US 689). As with contribution, where a party voluntarily settles a claim, he must demonstrate that he was legally liable to the party whom he paid in order to recover over against an indemnitor (Codling v Paglia, 38 AD2d 154, mod on other grounds 32 NY2d 330).
Order affirmed, with costs. Mahoney, P. J., Weiss, Yesawich, Jr., Crew III, and Harvey, JJ., concur.