It took longer than expected, but Drew Brees has a new deal with the Saints.

The veteran quarterback has agreed to a two-year, $50 million deal to remain with the team he's played for since 2006. USA TODAY Sports' Jarrett Bell confirmed the details after speaking with a person familiar with negotiations. That person requested anonymity because the Saints had not yet announced the extension for Brees, who is set to begin his 15th NFL season.

NFL FREE AGENCY: Broncos to land Keenum for 2 years, $36 million

Brees had been contacted by the Vikings on Monday, according to NFL Network, which may have helped hasten negotiations. New Orleans would have incurred $18 million in dead money to its salary cap while losing the best player in franchise history had Brees not agreed to a new deal by Wednesday at 4 p.m. ET.

Brees, 39, is an 11-time Pro Bowler. Barring injury, he will pass Brett Favre and Peyton Manning early this season and will become the NFL's all-time leader for passing yards. Brees currently has 70,445, which is just 1,495 behind Manning's standard.

NFL FREE AGENCY: Kirk Cousins, Vikings look to be nearing agreement

NFL FREE AGENCY: Sam Bradford plans to sign one-year contract with Cardinals

However Brees doesn't have to do it all for the Saints anymore. His 4,334 yards last year were the fewest of his 12 seasons in New Orleans as running backs Alvin Kamara and Mark Ingram shouldered more of the offensive load. The team's resurgent defense should make the NFC South champs a Super Bowl contender in 2018.