After months of waiting and weeks of silence, ESPN’s Adam Schefter announced on Monday that Detroit has finally locked up their franchise quarterback for the foreseeable future. Matthew Stafford has apparently agreed to a new five-year deal. Schefter is reporting that the deal will break Derek Carr’s record deal from earlier in the year that averaged $25 million a year over five years.

Lions and Matthew Stafford agreed to five-year contract expected to make him highest paid player in NFL history, a team source told ESPN. — Adam Schefter (@AdamSchefter) August 29, 2017

Here are the contract details, as first reported by Dave Birkett:

$27M APY for Stafford. — Dave Birkett (@davebirkett) August 29, 2017

The #Lions and QB Matthew Stafford agreed on a 5-year extension worth $135M, source said. Huge. — Ian Rapoport (@RapSheet) August 29, 2017

Stafford is entering his ninth season in the NFL, and is coming off arguably his best season to date. In 2016, Stafford was in MVP talks through November, leading Detroit to an NFL record eight fourth-quarter comeback victories. Though stiffer competition and a dislocated finger caused his production to dip in the final four games, he still finished with a career-low 10 interceptions, his second-highest completion percentage (65.3) and his best QBR (70.5) in his career.

With Stafford now signed for years to come, the Lions may turn their attention to Ezekiel Ansah. Ansah is set to become a free agent in 2018, but this year is huge for him. An ankle injury limited his production all year last season, while he spent all of training camp on the Lions’ Physically Unable to Perform (PUP) list. Detroit may choose to wait until after the season to negotiate a deal with the pass rusher.