NEW YORK -- - Salvador Perez hit a three-run homer off All-Star closer Clay Holmes in the ninth inning, and the Kansas City Royals beat the New York Yankees 8-6 Sunday to avoid being swept in the season series.
Whit Merrifield walked with one out - Holmes' eighth walk in his last eight games after he issued just five in his first 37 appearances. Bobby Witt Jr. was hit on the right hand with a pitch, forcing him from the game.
Perez, who struck out three times and popped out to the catcher in his first four at-bats, drove a 1-2 sinker 441 feet into Monument Park behind the center-field wall. It was the first home run allowed this year by Holmes, who was facing his 181st batter.
"He's got such good sink and his numbers are so overwhelming," Royals manager Mike Matheny said. "You just don't see right-handers take a lot of good at-bats against him. Don't tell that to Salvador Perez."
Perezis hitting .296 with 33 homers in 686 career at-bats in late and close situations - in the seventh inning or later with the Royals either ahead by one run, tied or trailing with the tying or go-ahead run at the plate, on base or on deck.
"I like to compete - I'm going to do my best, I don't care who's on the mound," Perez said. "He's got some good stuff, good sinker, good slider, both sides of the plate to righties, to lefties. This is the big leagues. If you make a mistake, someone's going to get you."
Holmes (5-2) blew a save for the third time in 20 chances.
"Trying to get a ground ball there and he's a pretty good fastball hitter and that one probably just got a little much of the plate," Holmes said. "But I think the two batters before - just a walk and hit by pitch - allowed them to get something going there."
Kansas City went 1-6 against the AL leading-Yankees, who last swept a season series of seven games or more by going 7-0 against Minnesota in 2009. The win also snapped a five-game losing streak for the Royals, who entered Sunday with the third-worst record in baseball.
"Had a couple tough ones, they start to affect anybody," Matheny said. "But this team just wants to keep fighting, play the game hard."
Taylor Clarke (2-1) threw a perfect eighth, then gave up DJ LeMahieu's single with one out in the ninth. Aaron Judge flied out to just shy of the track in right field, Rizzo walked and Gleyber Torres hit a game-ending lineout to center.
"Don't give up a homer," Clarke said dryly of his approach against Judge. "I thought he got it, just because anything to right field goes out."
Judge went 0 for 3 with two walks and ended July with a major league-leading 42 homers and 91 RBI.
New York overcame a 4-0 deficit and took a 6-4 lead when Anthony Rizzo hit a three-run homer into the right field second deck in the seventh off Dylan Coleman, Rizzo's 25th home run this season.
Hunter Dozier homered against Ron Marinaccio leading off the eighth, ending Marinaccio's 19-inning scoreless streak and run of 56 consecutive batters without allowing a hit.
Royals starter Zack Greinke allowed three runs, five hits and two walks with three strikeouts over five innings.
Yankees starter Jordan Montgomery gave up four runs, four hits and two walks with six strikeouts in four-plus innings. He has a 6.27 ERA in his last four starts.
Kansas City took a 4-0 lead in the fifth on Nick Pratto's two-run single, Maikel García's RBI double and Merrifield's run-scoring groundout.
Kyle Higashioka had an RBI single in the bottom half, and LeMahieu hit a two-run homer into the right-field short porch.
His streak of consecutive batters without a hit was the second-longest since 1974, according to STATS, behind Dennis Eckersley's 71 for Cleveland in 1977 and Dwight Gooden's 57 for the Yankees in 1996.
Judge's batting average dipped from .300 to .297. No one has batted at least .300 while hitting at least 50 homers and exceeding 100 RBI since Alex Rodriguez hit .314 with 54 homers and 156 RBI for the Yankees in 2007.
ZACK'S BIG APPLE DROUGHT
Rizzo's home run cost Greinke a chance to earn his win at the Yankees. He is 0-3 with an 8.63 ERA in eight games in the Bronx, including old Yankee Stadium.
Royals: IF Bobby Witt Jr. (right hand) said he felt good and didn't expect to need X-rays after being hit by a pitch in the ninth inning. Manager Mike Matheny said he was going to pinch-run anyway for Witt, who started his second straight game at designated hitter after missing the previous five games with a hamstring injury.
Yankees: RHP Luis Severino (right lat) is expected to begin throwing Monday. ... OF/DH Giancarlo Stanton (left Achilles) will begin baseball activities this week. ... LHP Zack Britton (left elbow) is scheduled to face batters this week for the first time since he Tommy John surgery last September.
Royals: RHP Brad Keller (5-11, 4.18), who leads the AL in losses, is slated to open a three-game series against the host Chicago White Sox.
Yankees: RHP Domingo Germán (0-1, 8.22 ERA) will make his third start of the season as a homestand continues with the opener of three-game set against Seattle.