SAN FRANCISCO -- Infielder Joaquin Arias has agreed to a $2.6 million, two-year contract with the San Francisco Giants to avoid salary arbitration.

Assistant general manager Bobby Evans announced the deal Thursday with Arias, a key utilityman and bench contributor for manager Bruce Bochy. The 29-year-old hit .271 with one home run, nine doubles, two triples and 19 RBIs in 102 games during his second season with the Giants in 2013. He had an emergency appendectomy in July after missing time in June with a strained hamstring.

Arias has often played against left-handed starters, while filling in at second base, third and shortstop.