KANSAS CITY, Mo. - David Phelps could only shake his head as he stood on the mound, kicking himself for an inning quickly gone wrong.
The Yankees had staged an unexpected rally -- unexpected given the way they've swung the bats lately -- from three runs down to tie the score in the sixth inning.
Latest Yankees stories
But Phelps walked the first two batters he faced in the bottom of the inning, then threw a sinker down and in that Salvador Perez hammered into the Royals' bullpen in left-center for a three-run homer. That left Phelps shaking his head in frustration.
There would be no second Yankees rally from a three-run deficit as they fell to the Royals, 8-4, in front of 26,991 at Kauffman Stadium.
"Those are the two biggest at-bats of the game," Phelps said of the walks to Billy Butler and Alex Gordon. "We just scored three runs. Worst kind of teammate right there to go out . . . We have all the momentum right there, and in  pitches, I gave it right back."
Phelps, who had pitched decently since being inserted into the rotation May 5 because of various injuries to the pitching staff, allowed seven runs and 10 hits in 52/3 innings. It came on the heels of his start last Monday against Seattle in which he allowed six runs in six innings.
"Frustrating's a PG-rated word for it," Phelps said of his last two outings. "I've been pitching decent going into later parts of the game and it's tough to win ballgames when you give up four runs in the sixth, seventh inning. It's just frustrating."
Joe Girardi left himself open to second-guessing when he left Phelps (1-4, 4.88) in to face Perez, who already was 2-for-2.
In fairness, Perez didn't tee off on a belt-high fastball. It was a sinker that neither Phelps nor catcher John Ryan Murphy said was a strike.
"I was shocked that he hit it like he did," Phelps said. "Tip your cap to him. He put a good swing on it."
Said Murphy: "It was actually a pretty good pitcher's pitch. To be able to put that swing on that pitch is pretty impressive."
After Perez's three-run blast, his sixth homer of the season, Lorenzo Cain tripled with none out and scored on Norichika Aoki's two-out single to make it 7-3. Eric Hosmer's homer on an 0-and-2 pitch from Matt Daley gave the Royals (30-32) an 8-3 lead in the seventh. Yangervis Solarte doubled and scored on Brian Roberts' grounder in the ninth to make it 8-4.
"You have to keep fighting back, that's the bottom line, and we're still fighting in the ninth inning," Girardi said. "We put good at-bats on in the ninth inning and hit some balls hard, but they were caught."
Danny Duffy, who came in 3-5 with a 3.05 ERA, shut out the Yankees for five innings before allowing three runs in the sixth. He gave up five hits and three walks in 52/3 innings. The Yankees (31-30) managed eight hits against four Royals pitchers.
The Yankees, who didn't get a runner in scoring position until the fifth, tied it at 3-3 in the sixth on an RBI double by Carlos Beltran, his first hit in 10 at-bats since coming off the disabled list, and a two-run double by Yangervis Solarte.
But Phelps fell behind Butler 2-and-0 and Gordon 3-and-0 in issuing the walks everyone felt changed the game.
"After we tie the game up like that, most important is the first out of the inning there," Murphy said. "We just nibbled a little bit too much and we need to be a little bit more on the attack."