Football's worst-kept secret is closer to being out of the bag.

The NFL Network's Ian Rapoport reports that the Jacksonville Jaguars will sign quarterback Nick Foles to a four-year, $88 million deal when free agency opens on Wednesday.

ESPN's Adam Schefter notes that the deal comes with just over $50 million guaranteed.

The Jags had been rumoured to be Foles's destination for weeks.

Foles, 30, spent the last two seasons in his second stint with the Philadelphia Eagles. Spelling the injured Carson Wentz, Foles led the Eagles into the playoffs in consecutive seasons and was the MVP in Super Bowl LII when the Eagles defeated the New England Patriots for their first ever title.

The Eagles announced in late February that the club would not be using the franchise tag on the quarterback.

After leading in the fourth quarter of the 2017 AFC Championship and ultimately falling to the Pats, the Jags regressed badly last season under Bortles, posting a 5-11 record and going 2-10 in their final 12 games of the season.The Jaguars recently hired John DeFilippo as the club's new offensive coordinator. DeFilippo was the Eagles' quarterbacks coach for their Super Bowl-winning season and is very familiar with Foles.

A native of Austin, TX, Foles is heading into his eighth NFL season. The product of Arizona has also spent time with the St. Louis Rams and Kansas City Chiefs.