Ryan O'Hearn ripped a two-run, pinch-hit homer in the seventh inning to propel the Kansas City Royals to a 5-2 interleague victory over the host Milwaukee Brewers on Tuesday afternoon.

Michael A. Taylor reached on an infield single to open the seventh when his slow roller down the third-base line stayed fair. Taylor advanced on a groundout. O'Hearn then drove a 2-1 pitch from reliever Hunter Strickland (0-1) 431 feet to center for his seventh home run, putting the Royals up 4-2.

Taylor extended the lead to 5-2 with a bases-loaded sacrifice fly in the eighth.

The game was switched from a scheduled evening start to avoid a conflict with Game 6 of the NBA Finals in Milwaukee on Tuesday night, when the Bucks could clinch the title at home against the Phoenix Suns.

Mike Minor (7-8), who had lost four consecutive starts with a 10.80 ERA over that span, allowed two runs -- one earned -- on five hits in six innings for the victory. He struck out five and walked one.

Newsletter signup for email alerts

Greg Holland pitched the ninth for his sixth save in 10 chances.

The Brewers loaded the bases with one out in the seventh on three singles off Jake Brentz, but Kyle Zimmer relieved and enticed Willy Adames into an inning-ending double play.

Kansas City, which had lost 17 of its last 21, won for just the second time in eight games. Milwaukee lost for the first time since the All-Star break after winning three straight at Cincinnati.

Milwaukee erased an early deficit with two runs in the second courtesy of Manny Pina, who had three hits in his previous 57 at-bats. Avisail Garcia singled to open, Tyrone Taylor walked, and Luis Urias reached on an error by third baseman Hunter Dozier to load the bases. After Keston Hiura struck out, Pina -- who entered hitting .122 -- lined a 1-0 pitch to left for a two-run single.

Kansas City tied it in the fourth on Jorge Soler's two-out solo homer, his eighth long ball of the season.

Andrew Benintendi's sacrifice fly put the Royals up 1-0 in the first.