NASHVILLE, Tenn. (AP) Right-hander David Hernandez and the Philadelphia Phillies have agreed to a one-year contract.

The 30-year-old was 1-5 with a 4.28 ERA in 40 relief appearances for Arizona this year, striking out 33 in 33 2-3 innings. He returned to the major leagues in June following Tommy John surgery in April 2014.

Hernandez is 25-35 with 19 saves and a 4.15 ERA in 309 games over six major league seasons with Baltimore Orioles (2009-10) and the Diamondbacks (2011-15). He worked his way up the Orioles system when Andy MacPhail, the Phillies' new president of baseball operations, was with Baltimore.

More from FoxSports

Philadelphia announced the deal Wednesday at the winter meetings.