Spalding, J.
In this action of contract there was evidence of these facts: At some time prior to September 29, 1944, the plaintiffs and the defendants entered into a written agreement by the terms of which the plaintiffs agreed to purchase and the defendants agreed to sell a two-family house. A few days before the date set for the passing of *491papers the plaintiffs moved into the house and “discovered that both apartments drew their electricity and gas from one meter.” On September 29, 1944, when the parties met for the passing of papers, the plaintiffs informed the defendants that they had agreed to purchase a two-family house and that they would not go through with the agreement unless the defendants agreed to pay them for the expenses that they might incur in installing gas and electric meters adequate for such a house. After some discussion between the parties two of the defendants, in order to induce the plaintiffs to pass papers, executed the following agreement: “September 29, 1944 It is hereby agreed that we, the undersigned, for consideration paid, will indemnify Louis V. Melotte and Ella Melotte from any expense incurred in installing gas and electric meters in premises #48 Gordon Ave. Hyde Park, Massachusetts. The undersigned have the option to engage contractors of their own choosing. Leonard Intonti Amalia I. Intonti.” The plaintiffs assented to this and papers were passed. The defendant Tucci orally agreed to the terms of the agreement.
In this action for breach of the indemnity agreement, the judge found for the plaintiffs. The question for decision arises out of the judge’s denial of the defendants’ second request which asked for a ruling that there “was no legal consideration sufficient to support the promise of the defendants to indemnify the plaintiffs.” From a decision of the Appellate Division holding that this request should have been granted and ordering judgment for the defendants the plaintiffs appealed.
It was said by Chief Justice Knowlton in Parrot v. Mexican Central Railway, 207 Mass. 184, 194, that, “As a general proposition, it is settled in this Commonwealth that a promise to pay one for doing that which he was under a prior legal duty to do is not binding for want of a valid consideration.” See Warren v. Hodge, 121 Mass. 106; Martiniello v. Bamel, 255 Mass. 25, 28; Williston, Contracts (Rev. ed.) §§ 130, 130A. We assume, therefore, that if the only consideration for the indemnity agreement was the plaintiffs’ performance of the original agreement, the plain*492tiffs could not recover. But it could have been found that the plaintiffs did more than this. There was evidence that a dispute arose between the parties concerning the meters and that the plaintiffs surrendered the right to litigate their contentions in exchange for the execution of the indemnity agreement by the defendants. “It is well settled that the abandonment of a claim believed to be well founded and made in good faith and ‘not frivolous, vexatious or unlawful, although not of such character in law or fact or both as finally to commend itself to the judgment of the tribunal of last resort, is the surrender of a thing of value and is a sufficient consideration for a contract.’ Codman v. Dumaine, 249 Mass. 451, 457-458.” Higgins v. Gilchrist Co. 301 Mass. 386, 390. Blount v. Wheeler, 199 Mass. 330, 336. Silver v. Graves, 210 Mass. 26, 30. Sherman v. Werby, 280 Mass. 157, 160. See Williston, Contracts (Rev. ed.) § 135; Am. Law Inst. Restatement: Contracts, § 76 (b).
In the case at bar the judge could have found that the claim abandoned by the plaintiffs was not vexatious or frivolous and was asserted in good faith. Silver v. Graves, 210 Mass. 26, 31. Higgins v. Gilchrist Co. 301 Mass. 386, 390-391. It follows that the trial judge rightly refused to grant the defendants' second request. The order of the Appellate Division must be reversed and the finding for the plaintiffs is to stand.
So ordered.