WASHINGTON (AP) Rebuilding their middle relief corps, the Washington Nationals have agreed with right-hander Shawn Kelley on a $15 million, three-year contract and with left-hander Oliver Perez on a $7 million, 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, when he made $2,835,000. His new deal calls for a $4 million salary next year and $5.5 million in each of the final two seasons.

More from FoxSports

In addition, Kelly can earn $200,000 annually in performance bonuses based on relief appearances: $50,000 each for 40 and 50, and $100,000 for 60.

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. He will earn $3 million next year and $4 million in 2017.

On Thursday, Washington acquired right-handed reliever Trevor Gott in a deal that sent infielder Yunel Escobar and $1.5 million to the Los Angeles Angels. The cash will cover part of the $8 million Escobar is guaranteed in the remainder of his contract, which includes a 2017 club option.

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.