Jimmy Graham and the New Orleans Saints have agreed to terms on a four-year, $40 million contract that includes $21 million in guaranteed money, a source told ESPN’s Adam Schefter on Tuesday.

Graham and the Saints reached terms on the deal just hours before the league’s July 15 deadline for players under the franchise tag to sign long-term contracts, ESPN notes. On Tuesday morning, Graham took to his Twitter account to announce his commitment to the Saints. “It’s official I’m bleeding black and gold this morning! Thank you WhoDatNation for all the support,” he wrote.

In terms of annual salary, the new contract makes Graham the highest-paid tight end in NFL history. He’s set to earn $10 million per season, a figure that surpasses the record established by the six-year, $54 million deal signed in 2012 by New England Patriots tight end Rob Gronkowski. Only San Francisco 49ers tight end Vernon Davis received more guaranteed money ($23 million), Fox Sports notes.

In May, the National Football League Players Association filed a grievance on Graham’s behalf, which claimed that the 27-year-old should be classified as a wide receiver, not a tight end, for franchise tag purposes. Under the league’s nonexclusive franchise tag guidelines, Graham would’ve earned $12.3 million as a wide receiver, compared to just $7.05 million as a tight end.

Graham’s representatives argued that he lined up away from the line scrimmage on 67 percent of the Saints’ offensive snaps last season, compared to just 28 percent for the average NFL tight end. However, an independent arbitrator sided with the Saints and ruled that Graham would be identified as a tight end. Saints head coach Sean Payton and General Manager Mickey Loomis each testified against him during the hearing.

A premier receiving target, Graham caught 86 passes for 1,1215 yards and a league-leading 16 touchdowns in 2013. In four NFL seasons, he’s amassed 301 receptions and 41 touchdowns.