The Detroit Lions and Matthew Stafford have agreed to a contract extension.

NFL Network's Ian Rapaport reports that the deal is five years, $135 million with $92 million of it guaranteed.

The 27 million dollar average annual value is the highest in league history, eclipsing the mark set earlier this offseason by Raiders quarterback Derek Carr ($25 million average annual value).

Stafford's previous deal was an average annual value of 17.67 million per year.

In eight seasons with Detroit Stafford has thrown for over 30,000 yards and 187 touchdowns. He has started 109 out of a possible 128 games in that time frame with a record of 51-58 in those starts. He has not won a playoff game yet in his career (0-3).