Tyler Ennis and the Buffalo Sabres made sure they didn't head into the lockout without a contract.

The Sabres and their premier restricted free agent agreed to a two-year deal today. The Buffalo News has learned the contract is worth $5.625 million, with the center earning $2.5625 million in 2012-13 and $3.0625 million in 2013-14.

"Tyler is a very important part of our offense and we are very happy to have him signed," Sabres General Manager Darcy Regier said in a statement. "He has progressed as a player over the past few seasons, and we are excited to see his growth, both as a person and professional, in the years to come."

Ennis, who turns 23 next month, has played 140 games with the Sabres, recording 38 goals, 54 assists and 92 points. He battled through an ankle injury last year but was strong in the second half, finishing with season totals of 15 goals and 34 points in 48 games.

Ennis spent his first season and a half with the Sabres at left wing, but with the team in dire need of help in the middle, Buffalo moved Ennis to center. In his 26 games in the middle, Ennis put up 27 points, recording 11 goals and 16 assists.

With the offseason trade of Derek Roy to Dallas, Ennis is expected to be the Sabres' No. 1 center. The Sabres made Ennis their second of two first-round picks in the 2008 entry draft.

The collective bargaining agreement between the NHL and the NHL Players' Association expires at midnight, and the owners will lock out the players unless a new deal is reached. By beating the deadline, Ennis can collect any signing bonuses before the lockout and won't be faced with the uncertainty of potentially different RFA rules in the next CBA.

---John Vogl