The San Francisco 49ers ensured that quarterback Jimmy Garoppolo won’t hit the open market this offseason as they have agreed to a record 5-year contract worth $137.5 million, according to NFL Network’s Mike Garafolo.

General manager John Lynch has invested a lot in Garoppolo, first sending the New England Patriots a 2018 second-round pick to acquire him last October, and now signing him to a lucrative contract.

The deal is the largest in NFL history on an average-per-year basis.

The 49ers went 5-0 in games that  Garoppolo, who has never lost a game he has started, started.