The Tampa Bay Rays have announced their three-year contract agreement with James Loney.

Loney will earn $21 million and had drawn interest from the Milwaukee Brewers, Pittsburgh Pirates and Houston Astros.

He played in all but four games in 2013, his first season with the Rays, hitting .299 with 13 home runs, 75 RBIs and a .778 OPS.