Nick Foles has agreed to sign with the Jacksonville Jaguars on a four-year, $88 million deal with $50.125 million in guaranteed money.

The $50.125 million is the largest amount of guaranteed money in franchise history.

The Jaguars will release Blake Bortles.

Foles opted out of his contract with the Philadelphia Eagles by paying them back $2 million in February.