PITTSBURGH (AP) Free agent John Jaso and the Pittsburgh Pirates have agreed to an $8 million, two-year contract.

The 32-year-old has played mostly in the outfield and at catcher in the past, but the Pirates plan on using him at first base, a position he has played in just two big league games.

Pedro Alvarez, who shifted from third base to first for the 2015 season, became a free agent when Pittsburgh declined to offer a 2016 contract.

More from FoxSports

''John is enthusiastic about playing in Pittsburgh and developing as a first baseman,'' Pirates general manager Neal Huntington said. ''We feel he has the ability to play the position at the major league level.''

Jaso will earn $4 million in each of the next two seasons under the deal announced Wednesday. He can make an addition $1 million annually in performance bonuses.

Jaso spent last season with Tampa Bay, hitting .286 with five homers and 22 RBIs in 216 plate appearances. He sprained his left wrist in the first inning on opening day when he walked and slid into Baltimore's Ryan Flaherty at second base while trying to advance. Jaso did not return until July 7.

Jaso hit .321 (17 for 53) in his last 22 games this year. A left-handed hitter, Jaso has a .263 average with 37 homers and 204 RBIs in seven big league seasons with Tampa Bay, Seattle and Oakland.