The St. Louis Rams have agreed to a one-year contract with free-agent defensive tackle Nick Fairley. The deal is worth $5 million, but can increase up to $8 million with incentives, a source told ESPN NFL Insider Adam Schefter.

Fairley made an appearance Friday at a team news conference that was held to also introduce recently acquired quarterback Nick Foles.

The 27-year-old Fairley was the Detroit Lions' first-round pick in 2011 with the No. 13 pick out of Auburn.

He had an inconsistent four seasons in Detroit, and that inconsistency led the Lions to decline the fifth-year option on his contract after the 2013 season (per NFL rules that stipulate all fifth-year options must be picked up or declined before the fourth year of play). This allowed Fairley to become a free agent after the 2014 season.

When Fairley's option was declined last offseason, Detroit general manager Martin Mayhew hoped it would help motivate the defensive tackle.

After showing up for 2014 offseason workouts slimmed down, Fairley gained weight again at the start of training camp. After a brief demotion, Fairley hired a personal chef and was in the midst of his most consistent season until a knee injury in Week 8 effectively ended his season. He didn't return to practice until the week of the Lions' playoff game against Dallas.

In what might have been a good sign of his dedication, Fairley kept weight off during the injury and was down to 290 pounds -- the lightest he had been in his pro career.

Fairley played in 46 games for the Lions, recording 98 tackles, 13.5 sacks, four forced fumbles and three fumble recoveries.

ESPN.com Lions reporter Michael Rothstein contributed to this report.