Alex Torres became a major piece in the Tampa Bay Rays’ bullpen last season, and because of that, he became a major piece in a seven-player swap with the San Diego Padres that addressed an area of need on the Rays roster.

Tampa Bay acquired infielder Logan Forsythe, right-handed pitchers Brad Boxberger, Matt Lollis and Matt Andriese and infielder Maxx Tissenbaum in exchange for Torres and minor league pitcher Jesse Hahn.

Forsythe, 27, who played parts of the past three seasons with the Padres, will be another movable part in Joe Maddon’s lineup — a right-hander who can play second base, shortstop and third base as well as the corner outfield spots.

“Torres was obviously phenomenal for us last season, and as the calendar turned into January we started really focusing on areas of weakness, places we wanted to be aggressive to augment,” Andrew Friedman, the Rays’ executive vice president of baseball operations, said.

Torres, who had a 1.71 ERA in 58 innings last season, quickly became a reliable arm in the bullpen and found himself pitching in high-leverage, middle inning spots. But with lefties Jake McGee and Cesar Ramos also owning spots in the bullpen and lefties C.J. Riefenhauser and Jeff Beliveau at Triple A Durham, Friedman felt he could part with Torres for Forsythe, a player Friedman has had his eye on for the past three seasons.

“He was very high on our target list,” Friedman said.

Forsythe was hampered last season by plantar fasciitis in his right foot. He batted .214 with six home runs and 19 RBIs in 75 games. He’s batted .241 with a .310 on-base percentage in 228 career games.

“We feel like various injuries have prevented him from reaching his potential,” Friedman said. “We feel like he has an upside on his skill set on both sides of the ball. We feel like that fits us really well. He plays extremely hard.”

Forsythe said he received a cortisone injection and spent the first three weeks of the offseason wearing a boot on his right foot.