The Buffalo Bills retained their top free agent Monday, re-signing defensive end Jerry Hughes.

Hughes received a five-year deal worth more than $45 million, a source told ESPN NFL Insider Adam Schefter. The contract includes $22 million in guaranteed money, a source told ESPN's Josina Anderson.

"It was our No. 1 wish list," Bills general manager Doug Whaley said Monday. "So we thought we need to keep the core together as long as possible. When you have a free agent come up that's been as productive as he is -- an integral part of our success on the defense -- we just said, 'Hey, let's go all-in on Jerry.'"

Hughes, 26, has 20 sacks since the start of 2013 season, tied for ninth in the NFL over that span.

"I think the conversation I had with my agent -- he was one of the first people to call me -- I said, 'Let's make this work,'" Hughes said Monday. "I led with the whole, 'We finished 9-7 and had the No. 2 defense.' We have a lot to accomplish, and I don't want to leave this ship unmanaged."

Even before re-signing Hughes, the Bills had over $30 million of their 2015 salary cap devoted to their defensive line, which includes Pro Bowlers Mario Williams ($19.4 million), Marcell Dareus ($8.06 million) and Kyle Williams ($6.4 million).

Jerry Hughes has 20 sacks since the start of the 2013 season, tied for ninth in the NFL over that span. AP Photo/Gary Wiepert

"I have said this before: When you don't have a large chunk of your cap eaten up by a marquee quarterback, you can spend it other ways," Whaley said. "We are going to be heavily invested in the defensive line. That is one of the ways that we are going to have to play to win with the makeup of our squad. Play good defense, run the ball and have the quarterback protect the ball. That is how we are building this team."

The Bills acquired Hughes in a trade with the Indianapolis Colts for linebacker Kelvin Sheppard before the 2013 season, and Hughes flourished as a situational pass-rusher in then-defensive coordinator Mike Pettine's scheme, recording 10 sacks.

Hughes became a full-time starter under defensive coordinator Jim Schwartz last season, matching his sack total (10) from 2013 and adding a career-high three forced fumbles. Now he will be featured in a defense led by new coach Rex Ryan and defensive coordinator Dennis Thurman.

A first-round pick of the Colts in 2010, Hughes' career got off to a slow start. He started just seven games over his three seasons in Indianapolis, posting five sacks.

"I have come a long way. Still have a lot more to do," he said. "I still have only started one year in the NFL. I have a lot more room to grow. I am excited to work and just get back at it."