Ed Werder reacts to the news that QB Drew Brees and the Saints agreed on a contract extension that will offer New Orleans cap relief. (2:26)

METAIRIE, La. -- Drew Brees and the New Orleans Saints waited until the 11th hour. But they finally agreed to a contract extension Wednesday -- four days before the quarterback's self-imposed Week 1 deadline.

The extension was announced as a five-year deal but contains an automatic void at two years, sources told ESPN's Ed Werder. That means Brees is contractually committed to the Saints for only the 2016 and 2017 seasons. His $20 million salary this season and $24.25 million for next season -- a total of $44.25 million -- is fully guaranteed, the sources said.

The deal also includes a no-trade clause and forbids the Saints from using their franchise tag on the quarterback. In essence, the Saints get Brees under contract for one additional season, but by spreading the contract over five years, they significantly reduce Brees' $30 million cap hit for 2016, which was the highest for any player in NFL history.

The extension reduces Brees' cap number from an NFL-record $30 million to $17.25 million for 2016, sources told Werder.

Brees said Wednesday he is "humbled and honored" to continue his journey with Saints. He said both sides are very happy with the contract's structure and wants to finish his career in New Orleans.

"I'll be here as long as they'll have me," he said.

Drew Brees is signing his third deal with the Saints, after a decade in New Orleans that has been the most prolific of any quarterback in NFL history. Photo by Sean Gardner/Getty Images

Brees said the contact process "is probably a bit more complicated than it should be" but said he understands the job everyone has to do. One thing "everyone is very much aligned with is what puts this team in the best position to win," he said. The salary-cap savings for the Saints was an important aspect of the deal for him.

"My approach is the same regardless, regardless of whether I have a five-year deal or I have a one-year deal. In my mind, you're always playing on one-year deals," he said. "Playing on one-game deals, you know? I mean, you've gotta prove it each and every week. You're only as good as your next performance. So that will always be mindset."

Brees, 37, acknowledged that he would have preferred a long-term deal.

"I plan to play for longer than two years, so yeah, I think my mindset going into this was to be able to secure a deal that would take me for as long as I plan on playing," he said. "But this is what was in the best interest of the team. And so that's why it was a two-year deal."

This is Brees' third contract with the Saints after he originally signed with the team in 2006. In 2012, he became the highest-paid player in NFL history to that point, thanks to his five-year, $100 million contract.

Brees was headed into the final year of his previous contract.

His decade in New Orleans has been the most prolific of any quarterback in NFL history. His 48,555 yards and 348 touchdown passes are the most of any quarterback in any 10-year span, according to the Elias Sports Bureau.

Brees has won exactly 100 games with the Saints -- including the only Super Bowl victory in franchise history, a 31-17 win over the Indianapolis Colts after the 2009 season.

He could pass Peyton Manning for No. 1 on the NFL's all-time passing yardage (71,940) and passing touchdown (539) lists before his next deal is up. He's on pace to do so within three or four years.

Brees ranks fourth in NFL history with 60,903 passing yards and will likely pass Dan Marino for third in Week 2. He and Tom Brady are tied for third in NFL history with 428 touchdown passes.

And he is still thriving at age 37. Brees has led the NFL in passing yards in four of the past five seasons -- including last year, when he threw for 4,870 yards in just 15 games played.

Re-signing him was easier said than done for a Saints team that has been spinning its wheels at 7-9 in each of the past two seasons, stretching the salary cap to its limit.

Re-upping with Brees signals a desire to get back into playoff contention quickly rather than going into a full rebuilding mode. Because of Brees' age, it was expected that the length of his contract and the total amount of guaranteed money was would be sticking points in negotiations between Saints general manager Mickey Loomis and Brees' agent, Tom Condon.