DETROIT: Matthew Stafford’s career with the Detroit Lions just got longer.Stafford and the Lions have agreed to terms on a $53 million, three-year extension to keep him under contract through 2017, according to a person familiar with the deal.The person, who spoke Tuesday to The Associated Press on the condition of anonymity because the agreement has not been announced, said Stafford will make $41.5 million in guarantees as part of a new contract.Detroit drafted Stafford No. 1 overall in 2009 and signed him to a six-year contract worth as much as $78 million with $41.7 million in guarantees. After two injury-shortened seasons, he helped the franchise reach the playoffs two years ago for the first time in more than a decade.A month ago, Stafford vowed that he would focus on football while his agent and the team negotiated.“I don’t play this game to get contracts,” he said in June. “I play this game to win games.”The Lions didn’t do much of that last year, losing their last eight games to flop to a 4-12 record after a 10-win season.Stafford threw more interceptions and had less than half as many touchdown passes in 2012 as he did the previous year.After playing in just 13 games over two seasons, he flourished in his first full year with 41 TD passes while completing 64 percent of his attempts and throwing 16 touchdowns.He stayed on the field last season, but his passing percentage dipped as did his TD passes (20) while he threw one more interception.

“Matt’s not happy with last year,” Lions coach Jim Schwartz said during last month’s minicamp. “None of us were happy with last year, but you also can’t overreact.”

Stafford has spent much of this offseason splitting time between his home in suburban Detroit and team headquarters, after working out and rehabilitating injuries elsewhere in previous years.

He has looked back to analyze the previous season, seeing when it was good to take chances with passes and when it wasn’t while the losses piled up after climbing to .500 midway through the season.

“It was a total, learning experience just because it was a tough year,” Stafford said. “You have to find a way to battle through it.”