Getty Images

The 49ers have their franchise quarterback locked up for years to come.

Jimmy Garoppolo has agreed to a five-year deal with the 49ers, according to multiple reports.

The full numbers aren’t out yet, but Mike Garafolo of NFL Network reports that the total value is $137.5 million, which would make it just a bit better than the five-year, $135 million deal Matthew Stafford got from the Lions last year. At $27.5 million a year it’s the biggest per-year average on a long-term contract in NFL history, although there’s no word on how much of that money is guaranteed.

The 49ers could have used the franchise tag to lock Garoppolo in for this year, but they wanted to get a long-term deal with him done now so there would be no question that he’s their starting quarterback for the foreseeable future.

Garoppolo played very well after arriving last season in a trade with the Patriots. The 49ers were 1-10 when Garoppolo became their starter, but they went 5-0 in games he started. Now they’ll see if he can turn the 49ers back into a Super Bowl team again.