MILWAUKEE (AP) -- Joey Gathright's bases-loaded walk in the 11th inning off Chris Spurling lifted the Kansas City Royals to a 4-3 victory over the Milwaukee Brewers on Sunday.
The Royals loaded the bases with no outs in the 11th against Jose Capellan (0-2). John Buck walked, Tony Pena singled, and Emil Brown walked, chasing Capellan.
Spurling entered and got David DeJesus to line out, but Gathright walked on five pitches to make it 4-3.
David Riske (1-2) pitched the 10th to get the win and Jimmy Gobble worked a perfect 11th for his first save.
Kansas City snapped a four-game losing streak. It was only the third time in 39 games that the Royals have come back to win when trailing after seven.
Corey Hart hit a solo home run off Kansas City closer Octavio Dotel with one out in the ninth to tie it at 3. It was Hart's 10th of the season and extended his hitting streak to 11 games.
Dotel has blown two straight save opportunities after converting his first six chances this year.
The Brewers, whose five-game winning streak ended, got a strong start from rookie Yovani Gallardo and led 2-1 when he left after seven innings.
Derrick Turnbow blew the lead in the eighth, walking pinch-hitter Fernando Cortez to open the inning. DeJesus followed with a single to center field and advanced to second when Bill Hall tried to throw out Cortez at third.
Gathright drove in Cortez with a weak groundout to second and Teahen followed with a sharp single to right-center to make it 3-2 as the sellout crowd of 44,064 booed.
The Brewers' top two home run hitters, Prince Fielder and J.J. Hardy, were out of the starting lineup.
Tony Graffanino homered for Milwaukee and finished with two hits.
Gallardo struck out eight, walked two and allowed five hits in his second start since being recalled from Triple-A Nashville to take the spot of injured left-hander Chris Capuano.
Gallardo walked DeJesus to lead off the game, then retired 13 consecutive batters before Esteban German singled in the fifth for Kansas City's first hit.
Odalis Perez pitched five innings for the Royals, giving up two runs and seven hits with two walks.
Ryan Braun had a sacrifice fly in the fifth and Graffanino hit his fifth homer in the sixth to help the Brewers build a 2-0 lead.
The Royals scored their only run off Gallardo in the seventh. Alex Gordon walked with one out, moved to second on Shane Costa's single and scored on German's base hit. Gallardo then struck out John Buck and Pena with Costa on third to end the threat.
The Brewers were 0-for-9 with runners in scoring position. ... Fielder pinch-hit in the ninth and remained in the game in extra innings. ... Hardy missed his third start because of lower back tightness, but is expected to return to the lineup Monday night against Houston.