WASHINGTON (AP) As compensation for losing his job as a closer, Kelvin Herrera gets to pitch for a contender.

Herrera joined the Washington Nationals on Tuesday, less than 24 hours after being traded from the last-place Kansas City Royals for three minor leaguers.

A two-time All-Star, Herrera had 14 saves and a 1.05 ERA this season. Washington already has a closer, Sean Doolittle, so Herrera will be entering the game earlier than usual for now.

"I explained it to him and I think he gets it," Nationals manager Dave Martinez said. "The way I explain it to all these guys is, `When you come in the game think of it as you're closing that inning, cause that's a big moment. So we need you either the sixth, the seventh, the eighth, whatever.'"

That's just fine with Herrera.

"Whatever inning I may get called upon, I just focus on getting that one hitter out," the right-hander said through an interpreter.

With 14 saves and one win, Herrera had a hand in more than two-thirds of Kansas City's 22 victories this season. But the Royals were going nowhere, which is precisely why they dished off their best reliever for a trio of prospects: 21-year-old outfielder Blake Perkins, 23-year-old infielder Kelvin Gutierrez and 17-year-old pitcher Yohanse Morel.

Herrera won a World Series ring with Kansas City in 2015. Now he's got a shot at earning one with the Nationals, who started the day 3 1/2 games behind first-place Atlanta in the NL East.

"The one thing I have seen about this team for the past few years is they're always in the battle and the fight for the playoffs," Herrera said. "There is great chemistry here. I'm just ready to join the team and help any way I can."

There will likely come a time when Herrera is asked to do what he does best, which is to get the final out in a tight game.

"I did tell him that Doolittle is our closer and he's been very good at it, but you'll get a chance to close every now and then," Martinez said.

Nationals general manager Mike Rizzo made the deal because he knows you can't have too many good pitchers working the back end of a ballgame.

"We wanted a guy who had been through the wars before, that's established and that was pitching extremely well," Rizzo said. "Kelvin fit all those criteria."