The Buffalo Bills have made certain veteran defensive end Jerry Hughes, their best pass-rusher, isn't going anywhere for awhile.

ESPN's Adam Schefter first reported Tuesday morning that the extension is for two years and worth up to $23 million. Citing a source, Schefter said the deal included $19 million in guaranteed money. Hughes was set to become a free agent after this coming season.

According to Spotrac.com, Hughes was due to a base salary of $6.35 million this year, plus a $1 million roster bonus, a $1.5 million option and $150,000 workout bonus. His cap hit, which also factored $1.4 million in deferred signing bonus from a contract extension he received in 2015, was due to be $10.4 million this year.

Hughes, who turns 31 this year, is entering his 10th NFL season and seventh with the Bills. He has 47 career sacks, five of which came as a member of the Indianapolis Colts from 2010 to 2012. The Colts, who made Hughes a first-round draft pick from TCU in 2010, traded him to the Bills in 2013 for linebacker Kelvin Sheppard. After being viewed as somewhat of a disappointment in Indianapolis, Hughes has played his best football for the Bills.

Hughes led the Bills with seven sacks last season. It was his highest total since he had back-to-back 10-sack seasons in 2013 and 2014. With the Bills, he has 42 sacks.

According to Pro Football Focus, Hughes' overall grade of 88.8 was ninth in the league and his pass-rush grade of 91.0 was No. 2 in the league.

A key member of one of the best defensive lines last season, Hughes is now on track to play a key role for the Bills for more than a decade.