The Rams tied for the NFL lead in sacks in 2012, and one of the key components of that pass rush — defensive end William Hayes — is returning to St. Louis.

Hayes, 27, went off the market less than an hour before the start of the free agency period when he agreed to terms on a three-year deal.

Hayes had seven sacks last season for the Rams, and was equally strong against the run, turning into a super-sub off the bench. For the most part, he spelled Chris Long at left end or lined up at defensive tackle in passing situations.

Hayes was considered one of the Rams’ top priorities in terms of re-signing their own free agents. For a while, it looked like he might reach the market.