SANTA CLARA, Calif. (AP) Jimmy Garoppolo could have waited and cashed in even more than he did after other quarterbacks re-set the market.

The San Francisco 49ers could have used a franchise tag instead of making a long-term commitment to make sure Garoppolo was worth a hefty investment after only seven NFL starts.

But both sides wanted this resolved quickly, and did so with a contract that will pay Garoppolo a record $27.5 million per season over the next five years.

"This is where I want to be, honestly," Garoppolo said at a news conference Friday. "I wanted to get this deal done as fast as possible. It will only help our team going forward going into free agency. ... I wanted to be here. I was excited to be here. I'm happy we got it done as fast as we did."

Garoppolo's $137.5 million contract has the richest annual value in NFL history, topping the deal Detroit's Matthew Stafford signed last year by $500,000 a season.

The deal includes nearly $49 million that is full guaranteed, more than $74 million guaranteed for injury and more than $86 million that will be paid out over the first three seasons.

The franchise tag could have been a safer option for both sides, leading to more money for Garoppolo if he kept playing at the high level he showed this past season and more protection for the 49ers if he didn't reach that level.

But neither side was eager to go that direction.

"We became convinced we had that as an option, but we didn't want to use it," general manager John Lynch said. "We wanted to make Jimmy a 49er for a long, long time. Do you have to have some faith for that? Absolutely. But he earned that faith we had for him. I know it wasn't a super long time but we felt we had a really good grasp on the talent and that was only confirmed when he got here."

San Francisco acquired Garoppolo from New England before the trade deadline for a 2018 second-round pick. As soon as he took the field a few weeks later, he immediately turned around a franchise that started the year with a 1-10 record.

Garoppolo took over as starter and led San Francisco to five straight wins to end the season. He completed 67.4 percent of his passes this season, averaging 8.8 yards per attempt with seven TDs, five interceptions and a 96.2 rating.

Among quarterbacks with at least 100 attempts last season, Garoppolo ranked first in yards per attempt, fourth in completion percentage. His 308.4 yards passing per game in his five starts also would have led the league had he played a full season.

Now he will have a full offseason to completely learn coach Kyle Shanahan's offense, which could lead to even more production.

"Now the rush isn't quite the same," Shanahan said. "He can start from the beginning and start from the first page and not the 50th page. He can get a better foundation. When you have a better foundation of where you're coming from and learning, it gives you a chance to play at a higher level."

Garoppolo has won all seven starts in his career, including two in New England to start the 2016 season when Brady was suspended for his role in "Deflategate." Only four other quarterbacks since the 1970 merger won their first seven starts, with Ben Roethlisberger the most recent to do it with 15 wins in a row in the regular season for Pittsburgh in 2004-05. Garoppolo's 2,038 yards passing in his first seven starts are the fourth most among all quarterbacks since 1970.

The deal still leaves the 49er with more than $60 million in salary cap room, according to executive vice president Paraag Marathe, with several more holes to fill. The most glaring needs are upgrading the skill position players and interior of the offensive line, and finding a big-time pass rusher and cornerbacks to help the defense.

Lynch said he plans to be "aggressively prudent" with that money but believes this deal will help sell the organization to potential free agents, including some who played for San Francisco this past year.

"One of the reasons for the urgency, if there was some for us, was heading into free agency this is a big deal," Lynch said. "It's 75 degrees and sunny outside. We have this guy. Who wouldn't want to be here? We want to become a destination where everyone wants to be."