According to sources, Za'Darius Smith has agreed to terms on a three-year, $42 million contract with the Minnesota Vikings.

The deal could be worth up to $47 million if he reaches incentives, according to sources.

Smith decided not to sign a four-year, $35 million deal with the Baltimore Ravens last week.

According to a source, the Ravens believed they had reached a verbal agreement on a deal that averaged $8.25 million per season, which seemed like a great value for a two-time Pro Bowl player. A source said Smith expressed second thoughts after the Buffalo Bills and Von Miller signed their big-money deals. The sides couldn't agree on a new deal, according to a source.

Smith was released by the Packers on March 14 as part of a series of moves to get under the salary cap.

Smith, who was named to the Pro Bowl in each of his first two seasons with the Packers, played only 18 snaps last year in the regular season. He underwent back surgery after the season opener. He did not return until the 49ers game.

Smith tried to get a contract extension with the Packers last year. He missed most of training camp because of a back injury.

Brian Gutekunst gave Smith a four-year, $66 million deal, making him the highest-priced free agent ever. He had the most sacks in his first two seasons with the Packers. He was one of three players in the league with at least 12 sacks in each of the last two years.

Smith has 44.5 sacks in seven seasons in the NFL. He was a fourth-round pick of the Baltimore Ravens.

Rob Demovsky was a contributor to this report.