The 49ers on Tuesday morning announced the release of wide receiver Torrey Smith, who spent two seasons with the club after signing as a free agent in 2015.

“The 49ers would like to thank Torrey for representing this organization with tremendous class over the last two years,” 49ers general manager John Lynch said in a statement. “I have always had great respect for his skill as a player and as a wonderful example of how professional athletes can use their platform to make a difference in our community. We wish Torrey, and his family, all the best.”

The 49ers' previous regime, including then-general manager Trent Baalke, signed Smith to a five-year, $40 million contract after Smith caught a career-best 11 touchdown passes with the Baltimore Ravens in 2014.

In two seasons with the 49ers, the club struggled in the passing game with quarterbacks Colin Kaepernick and Blaine Gabbert. Smith totaled just 53 receptions for 930 yards with seven touchdowns in 28 games.

Smith, who was scheduled to earn $8 million in base salary this season, becomes free to sign with any team. The move will create approximately $4.7 million on the 49ers' salary cap, giving the club more than $95 million in cap space at the start of the new league year.