MILWAUKEE (AP) -- Mike Moustakas' solo homer opened a five-run seventh inning that snapped an extended run-scoring slump for the Kansas City Royals, who held off the Milwaukee Brewers in the ninth for a 5-4 win on Wednesday.
Danny Duffy (4-7) allowed five hits over six effective innings for the Royals, who split a two-game interleague series with the NL Central-leading Brewers.
The Royals then called on Wily Peralta, a former Brewer, to close out the game after Brad Miller hit a three-run homer off reliever Tim Hill with nobody out in the ninth to get the Brewers within 5-4.
Eric Thames struck out before pinch-hitter Erik Kratz singled. Peralta then got Ryan Braun to bounce into a game-ending double play. Braun was initially ruled safe before the play was overturned on review.
The Royals' offense finally gave their pitching staff some support.
Moustakas and Whit Merrifield each had two hits and an RBI, while eighth-place hitter Adalberto Mondesi's two-run single with the bases loaded off normally lights-out reliever Josh Hader gave Kansas City a 3-1 lead in the seventh.
The Royals added two more runs in the inning, giving them more than four in a game for the first time since a 9-6 loss to the Angels on June 4. That 19-game stretch with four runs or fewer was the longest in the majors since the Baltimore Orioles went 21 straight in September 1992.
Kansas City was hitting .188 in June coming into the game Wednesday.
Hader allowed all three runners he inherited to score. He gave up one earned run on his own, along with hits in two-thirds of an inning. The hard-throwing left-hander's ERA rose to 1.33.
Brewers starter Brent Suter (8-5) allowed six hits and four runs with six strikeouts before leaving with the bases loaded and nobody out in the seventh.
Duffy struck out seven and walked two. The left-hander has a 2.52 ERA over his past four starts.
Royals: RHP Justin Grimm was placed on the 10-day disabled list retroactive to June 24 with what they club said was right shoulder impingement syndrome. Grimm (1-3), who is making his second trip this year to the DL, would be eligible to return on July 4 against Cleveland. RHP Jason Adam was called up from Triple-A Omaha to replace Grimm in the bullpen. ... C Salvador Perez left the game with nobody out and two on in the top of the ninth after a foul ball off the bat of Brad Miller ricocheted off his upper right leg. He was replaced by Drew Butera.
Brewers: 3B Travis Shaw was held out of the lineup for a second straight day to rest his sore right wrist. "And then tomorrow, we'll take a hard look at how he's feeling," manager Craig Counsell said.
Royals: After a day off in Seattle, Ian Kennedy (1-7) opens a three-game series against the Mariners.
Brewers: Junior Guerra (3-5) pitches the opener of a four-game series in Cincinnati. The right-hander is 1-1 with a 6.75 ERA at Great American Ball Park.