Kelley's contract is for three years. The seven-year veteran had a 2.45 ERA in 53 games for the Padres last year, striking out 63 hitters and walking 15 in 51 1/3 innings.
Perez, who worked primarily as a starter from 2002-10, is expected to serve as a setup man and left-handed specialist for the Nationals after going 2-4 with a 4.17 ERA in 70 appearances for the D-backs and Astros last year. He was traded from Arizona to Houston on Aug. 8.
Perez is one of just five left-handed relievers in the Major Leagues who has appeared in 60 games or more and struck out at least 50 batters in each of the past three seasons (Tony Watson, Glen Perkins, Mike Dunn, Brett Cecil).