SAN FRANCISCO (AP) — Whit Merrifield broke a 2-2 tie with an eighth-inning sacrifice fly and the Kansas City Royals edged the San Francisco Giants 3-2 to avoid a three-game sweep. Andrew Benintendi led off the inning with a pinch-hit double off Giants reliever John Brebbia. Nicky Lopez moved him to third on a sacrifice bunt and Merrifield brought him home. Brandon Belt homered for the Giants, whose five-game winning streak ended. Royals reliever Jose Cuas retired three batters to earn his first career victory. Scott Barlow recorded the last five outs for his seventh save in eight opportunities. Kansas City snapped a four-game losing streak.