Allen Park — He who gets paid last, gets paid the most. At least that's how it often works in the NFL.

Detroit Lions quarterback Matthew Stafford’s reign as the NFL’s highest-paid player will come to an end in less than a year, according to multiple reports. The San Francisco 49ers have agreed to a five-year, $137.5 million contract with quarterback Jimmy Garoppolo, trumping the five-year, $135 million extension Stafford signed prior to the start of the 2017 season.

Garoppolo, 26, will be entering his fifth season. A second-round pick in 2014, he spent his first three seasons with the New England Patriots prior to being traded to the 49ers in the middle of last season.

In 23 appearances, Garoppolo has completed 67.3 percent of his passes for 2,250 yards, 12 touchdowns and five interceptions. Remarkably, he’s undefeated as a starter, including a 5-0 stretch with the 49ers last season after the team started the year 1-10.