Offensive lineman T.J. Lang has agreed to a three-year contract with the Detroit Lions, the team announced Sunday.

He is the second offensive lineman to join the Lions in free agency, along with Rick Wagner, who signed a five-year, $47.5 million deal with $29.5 million guaranteed. Lang and Wagner will be counted on to replace Riley Reiff (Vikings) and Larry Warford (Saints), who left the Lions in free agency, and to help a Detroit offense that ranked 30th in rushing last season.

Lang, who has spent his eight-year NFL career with the Green Bay Packers, made his first Pro Bowl last season at age 29. Despite being hobbled by a nagging hip injury that required postseason surgery and a broken foot, Lang managed to play in all but three games.

He had surgery on his hip in January but said Sunday he will be ready for training camp.

"I'll definitely be ready by training camp, no doubt about it. I know that was a big story the past couple weeks, but for me, it's nothing but a positive," he said.

"This is something that I've been dealing with for a number of years. Has always caused me a pretty good amount of pain at some point during the season, so it's really been three or four seasons since I came into training camp just 100 percent healthy, and I really feel that's where I'm going to be this year."

The 2009 fourth-round selection, who was born in a suburb of Detroit and attended Eastern Michigan, has been a full-time starter since the 2011 season and just finished a four-year, $20.8 million contract extension.

After the Packers released guard Josh Sitton shortly before last season, Lang became the senior member of Green Bay's starting offensive line. He has played in 119 of a possible 128 career games.

Lang is the second offensive lineman to leave the Packers in free agency, joining center JC Tretter, who signed a three-year contract with the Cleveland Browns.

ESPN's Michael Rothstein and Rob Demovsky contributed to this report.