Devin McCourty was thiiiis close to leaving the New England Patriots.

McCourty called Patriots head coach Bill Belichick, thanking him “for a great five years with the franchise,” ESPN.com reported Sunday night, as the safety was ready to accept another offer. Belichick and the Patriots made a last-second offer, McCourty accepted, and now he’s set to be the second-highest paid safety in the NFL with a five-year, $47.5 million contract with $28.5 million guaranteed.

McCourty had offers from the Philadelphia Eagles, Tennessee Titans, Jacksonville Jaguars and New York Giants before the Patriots stepped up financially. McCourty had at least one higher offer on the table, according to multiple reports.

Thumbnail photo via David Butler II/USA TODAY Sports