Foley won the Republican nomination for governor on May 17, 2014, securing more than 57% of the delegates. He faced Danbury Mayor Mark Boughton and Senate Minority Leader John McKinney of Fairfield in the August primary. Foley said that he and McKinney, his main rival, agreed to forgo any negative campaigning during the primary to avoid weakening the Republicans' general election candidate, and then later accused McKinney of violating that pledge when the campaign took a negative turn. On June 3, 2014, Foley announced that he would accept public financing.