DETROIT (AP) " Matthew Stafford and the Detroit Lions agreed on a six-year deal Friday night, his agents told The Associated Press.
Tom Condon and Ben Dogra, who both represent Stafford, said the Lions will pay Stafford $41.7 million in guarantees and as much as $78 million.
Quarterback Matt Ryan, the No. 3 pick in last year's draft, was signed to a $72 million, six-year contract with $34.75 million guaranteed by the Atlanta Falcons.
Detroit desperately needs a quarterback to help turn around the NFL's first 0-16 team, which has had the worst eight-year stretch in the league since World War II, and is turning to Stafford after he was a starter in each of his three seasons at Georgia.
The Lions will formally take Stafford with the No. 1 pick in the draft Saturday.
They will have more chances to rebuild their team with the 20th overall selection, a second-round pick and a pair of slots in the third round.
Detroit general manager Martin Mayhew said earlier in the week the chances were "very good" an agreement would be reached with the No. 1 pick before the draft begins.
On the eve of the draft, the lucrative deal was done.
Stafford always seemed to be Plan A, but Wake Forest linebacker Aaron Curry and Baylor offensive tackle Jason Smith apparently were backup options.
Stafford will not be able to fix all the problems associated with a franchise that has been bad enough to go 31-97 since 2001 in what has been the worst eight-year stretch by an NFL team since the Chicago Cardinals won 23 percent of their games from 1936-43.
But the Lions can't afford to draft another bust.
"Obviously, the draft is the biggest crap shoot there is," Stafford recently acknowledged.
Recent No. 1 picks have proven that.
Eight of the past 11 players taken first overall in the NFL have been QBs, and half of them either haven't or didn't pan out for the teams that took them.
For every Peyton Manning and Carson Palmer, guys like Tim Couch and David Carr have shown there are no guarantees.
Stafford might get a chance to initially learn from the sidelines, backing up Daunte Culpepper.
First-year coach Jim Schwartz has said Detroit's staff studied Stafford extensively on film.
"We've seen every pass he's thrown in the last two years, and that's where you learn about his decision-making ability," Schwartz said last month.
The Lions also interviewed Stafford, attended his pro day at Georgia and had a private workout with him to learn more about him as a person.
Apparently, they're convinced he is the man to be the face, voice and arm of perhaps the biggest rebuilding project in NFL history.
He was 27-7 as a starter for the Bulldogs, throwing for nearly 51 touchdowns and nearly 8,000 yards with a powerful arm.
"I was relaxing and my hands were relaxing and the ball just shot through and hit me right in the face," Georgia teammate A.J. Green said last year.
When Schwartz was hired last winter, he joked that it was about time to replace Bobby Layne, who starred at quarterback for the Lions when they were an NFL power in the 1950s.
In a coincidence, Stafford and Layne both played at Highland Park High School in Dallas.
AP Football Writer Dave Goldberg in New York contributed to this report.