by Dave Birkett, USA TODAY Sports

by Dave Birkett, USA TODAY Sports

The Detroit Lions spent decades searching for a franchise quarterback to build their team around. Now that they think they have one, the last thing they want to do is let him go.

Matthew Stafford agreed to a three-year contract extension that will keep him in Detroit through 2017 and make him - for the second time in his short career - one of the highest-paid players in the NFL.

Stafford's new deal is worth $76 million over five years, including $43 million guaranteed. It gives the team some downside protection and him a chance at a third mega-deal while he's still in the prime of his career, a person with knowledge of the negotiations told USA TODAY Sports.

The person spoke on the condition on anonymity since the team had yet to announce the deal.

Stafford, 25, was scheduled to make $12.5 million this season and carry a $20.8 million cap charge.

He owns team single-season records for passing yards, touchdown passes, completions and attempts, and he likely will break Bobby Layne's career passing mark this fall.

He has thrown for a combined 10,005 yards the last two years and joined Tom Brady, Drew Brees and Dan Marino as the only quarterbacks to top 5,000 yards in a single season.

Stafford said several times this offseason that he hoped to remain a Lion for the balance of his career, and the Lions have no problem handing over their second mega-deal in the past 16 months to a player who has overcome early injury woes to take a prime leadership role in the locker room.

Limited to a combined 13 games his first two seasons because of knee and shoulder injuries, Stafford has started every game the last two years and led the Lions to the playoffs in 2011.

After the Lions missed the postseason and his production waned in 2012 - he threw 21 fewer touchdown passes and completed 59.8% of his passes - Stafford spent the offseason in Detroit.

"He's evolved into a leader," Lions President Tom Lewand said last month. "Now when rookies walk into the locker room they see a quarterback who's been here four years and they see a different guy who occupies a different spot on the team and a lot of that is because of his own efforts.

"I don't think we have a guy on our roster who's worked harder than he has, and I'm not sure that you'll find a guy who cares more than he does about this team and about winning, and about his teammates."

The No. 1 overall pick out of Georgia in 2009, Stafford would be the fifth quarterback to sign a contract extension this offseason.

The Baltimore Ravens' Joe Flacco got $51 million guaranteed on a $120 million deal a month after winning the Super Bowl; the Dallas Cowboys' Tony Romo got $55 million guaranteed on a seven-year, $119 million deal April 1; and the Green Bay Packers'Aaron Rodgers got $54 million guaranteed on a $130 million deal four weeks later. Brady added three years and $27 million to his contract with the New England Patriots while getting $30 million upfront.

The Atlanta Falcons' Matt Ryan also is expected to sign a new deal before the start of the season.

Stafford, who made $50.5 million in his first four seasons, Romo and Ryan are epresented by Creative Artists Agency, and Stafford's deal should give the Lions cap flexibility going forward.

With Stafford and Calvin Johnson, who signed an eight-year, $131 million deal in March 2012, under contract, the Lions can shift their focus to defensive tackle Ndamukong Suh.

Suh's rookie deal voids after the 2014 season, and his cap charge next year of $21.4 million makes it unlikely the Lions could use the franchise tag to retain him. Tagging Suh for one year would cost the Lions $25.7 million.

Suh said in late May he was "two years away from even considering" an extension but that he'd "love to be here in Detroit."

A couple weeks later, Stafford insisted that his contract wouldn't be a distraction this year, regardless of whether it got done or not.

"I don't play this game to get contracts," Stafford said at the time. "I play this game to win games and that's the way I've always felt about it."

Stafford, however, regressed in nearly every statistical category in his fourth NFL season after throwing for 5,038 yards and 41 touchdowns in 2011.

The Lions also could use cap room after renegotiations with Stafford the past two offseasons pushed his cap numbers to $20.82 million in 2013 and $19.32 million in 2014. The Lions entered Tuesday $1.895 million under their adjusted cap for 2013.

Stafford received an $8.475 million bonus to sign the first renegotiation in August 2011 and a $10.885 million bonus to sign the other in March 2012, drastically lowering his cap number for the coming season each time. The last non-voidable year under Stafford's old deal was 2014.

It's the second lucrative contract extension finalized in as many days by Stafford's agent, Tom Condon, who got wide receiver Victor Cruz's long-awaited deal done with the New York Giants on Monday. Next up likely is Ryan, who is entering the last year of his rookie deal.