WASHINGTON -- Rebuilding their middle relief corps, the Washington Nationals have agreed with right-hander Shawn Kelley on a three-year contract and with left-hander Oliver Perez on a two-year deal.

The team announced both agreements Friday.

Kelley, 31, was 2-2 with a 2.45 ERA in 53 appearances for the San Diego Padres last season.

More from FoxSports

Perez, 34, who previously was with the Nationals' Double-A Harrisburg affiliate, was a combined 2-4 with a 4.17 ERA in 70 games with the Diamondbacks and Astros in 2015. His deal with Washington is worth $7 million.

On Thursday, Washington acquired right-handed reliever Trevor Gott in a deal that sent infielder Yunel Escobar to the Los Angeles Angels.

The Nationals ran into problems with their inexperienced middle relief corps last season, one reason a club with World Series aspirations failed to even make the playoffs.