The 49ers on Wednesday morning reached a five-year contract agreement with nose tackle Ian Williams, a league source told CSNBayArea.com.

The move to secure Williams, who was scheduled to be an unrestricted free agent, comes with the free-agent signing period set to open Wednesday at 1 p.m. Williams and his agent, Drew Rosenhaus, were able to gauge the market for two days during the early negotiating period before opting for Williams to remain with the 49ers.

Williams, 26, a five-year NFL veteran, originally signed with the 49ers as an undrafted rookie from Notre Dame in 2011.

He played his first 16-game season in 2015 and was one of the 49ers’ top performers on the defensive line, making Williams the 49ers' top priority to retain as a free agent. Williams ranked third on the 49ers with 85 total tackles, according to the stats compiled by the coaching staff.

Williams took over as the 49ers’ starting nose tackle in 2013 after the free-agent departure of Isaac Sopoaga. But he started just 10 games over the next two seasons due to two fractures of his lower leg.

In late-December, Williams said he was not surprised that the 49ers would wait until after the season to actively pursue a new deal for him.

“No, I’m not surprised,” Williams said. “I’m sure they just wanted to see me make it through a season healthy. I don’t know. I’m not worried about all of that."

When asked if he wanted to be back with the 49ers, Williams answered, “I would love to. This is where I’ve been. This is where I know guys on the team. This is where I’m comfortable at. I’d love to be back.”

 

Williams becomes the second defensive lineman the 49ers have locked up to a multi-year deal this offseason. The 49ers recently signed defensive end Quinton Dial to an extension through the 2019 season. The 49ers also invested their first-round draft pick last year in defensive lineman Arik Armstead.

Williams' new contract is worth between $5 million and $6 million per season, the NFL Network reported.