KANSAS CITY, Mo. (AP) Yankees manager Joe Girardi knew he was putting young Chasen Shreve, just recalled from the minor leagues earlier in the day, into just about the most difficult spot possible.
Protecting a one-run lead with the bases loaded in the 10th inning in the midst of a playoff chase.
Against the reigning World Series champions, no less.
Shreve responded by calmly striking out Kendrys Morales, then retiring Salvador Perez on a fly out, to preserve a 5-4 victory over the Kansas City Royals on Tuesday night.
''I mean, it was really difficult,'' Girardi said of the mess Shreve inherited, which led to his first career major league save. ''He came in and really picked us up.''
The Yankees took the lead when Brian McCann and Chase Headley singled off Joakim Soria (4-6) in the 10th. Soria bounced back to strike out Aaron Judge and Tyler Austin, but then walked Brett Gardner before Jacoby Ellsbury lined a go-ahead single off the reliever's leg for his fourth hit of the night.
''That was an easy ground ball right to me. I don't know if I slipped or something, but I ended up on the ground,'' Soria said. ''It's just one of those things.''
Dellin Betances (3-4) earned the win with two innings of relief.
''We had a lot of opportunities we didn't cash tonight and that's going to happen,'' Girardi said, ''but I thought winning this one was really big.''
Morales went deep for the Royals to spur their comeback, then provided the tying sacrifice fly in the eighth inning. Jarrod Dyson and Lorenzo Cain also drove in runs for Kansas City.
The Yankees built a 4-0 lead off Edinson Volquez on a two-run homer by Aaron Judge and RBIs from Ellsbury and Headley by the third inning. But they watched it slowly slip away around a 59-minute rain delay that saturated the soggy turf at Kauffman Stadium.
In fact, just about all that could slow down the Yankees' Masahiro Tanaka was the rain.
The right-hander mowed through the first eight batters he faced, extending the streak of 14 2/3 scoreless innings he had twirled in his last two starts. Tanaka didn't allow a hit until a single by Raul Mondesi, who later scored on Dyson's triple off the top of the wall.
Tanaka's only other mistake came on Morales' homer in the fourth inning.
The rain began falling and the tarp came out after the fifth inning, and the delay was long enough to end Tanaka's night. He allowed two runs and four hits while striking out four without a walk.
''It's tough. I had enough energy so definitely I would have liked to go out there,'' Tanaka said through a translator, ''but you can't do anything about the weather.''
The Royals got within 4-3 in the sixth inning when Cain slapped an RBI double off Adam Warren, then they coaxed across the tying run in the eighth against Tyler Clippard and Betances.
Clippard walked Cain to start the inning. Cain promptly stole second off Betances, and the throw from catcher Gary Sanchez squirted into the outfield, allowing Cain to reach third. He trotted home to knot the game 4-all when Morales lofted a sacrifice fly to center.
''What these guys did, they fought to the bitter end,'' Royals manager Ned Yost said. ''We were down 4-0, battled back, tied the ball game under horrible conditions. It just wouldn't stop raining from the third inning on. We had the go-ahead run on second base. We just couldn't get it in.''
The Yankees optioned RHP Kirby Yates to rookie-level Pulaski and recalled Shreve from Triple-A Scranton/Wilkes-Barre. Shreve joined the Yankees for the fourth time this season.
The Pirates sent OF Tito Polo and LHP Stephen Tarpley to the Yankees to complete their Aug. 1 deal for RHP Ivan Nova. Polo hit .289 with 16 homers between Class-A Bradenton and West Virginia, and Tarpley was 6-4 in 20 starts with Bradenton.
Yankees: 1B Mark Teixeira sat again with pain in his neck. ''From a health standpoint I have to watch him closely,'' Girardi said, ''but he's feeling better today than he was yesterday.''
Royals: RHP Wade Davis allowed one hit and struck out two in one inning at Triple-A Omaha. Davis is on a rehab assignment after a flexor strain but could rejoin the Royals soon.
RHP Luis Cessa, the second Yankees pitcher since 2004 to win his first two career starts, returns to the mound for New York. RHP Ian Kennedy tries for his fourth straight win for the Royals.