Padres 4, Diamondbacks 3: Yonder Alonso plated Cameron Maybin with a fielder's-choice grounder in the bottom of the ninth inning as host San Diego overcame three errors to snap its four-game losing streak.

Maybin initially was ruled out a grounder to begin the ninth against Oliver Perez (0-1), but replay confirmed he beat out the throw from Arizona second baseman Aaron Hill for an infield single. Perez bounced back to strike out Will Venable, but Rene Rivera doubled to deep right field and Alonso followed with a bouncer to first baseman Paul Goldschmidt that gave Maybin enough time to race home from third with the winning run.

Rivera finished with two RBIs, Maybin scored twice and Huston Street (1-0) worked around a single and a walk in the ninth for the win. Goldschmidt went 2-for-3 with a solo blast and Tuffy Gosewisch drove in two runs as the Diamondbacks saw their four-game road winning streak come to an end.

After Arizona starter Wade Miley hit Jace Peterson with a pitch with one out in the third, Chris Denorfia gave San Diego its first lead in five games two batters later with an RBI single to right. The Padres' advantage proved to be short-lived, however, as Goldschmidt led off the fourth with his homer and Gosewisch took advantage of an error by San Diego shortstop Everth Cabrera to plate a pair of unearned runs with a two-out single.

The Padres answered in the bottom of the frame as Maybin and Venable recorded two-out singles ahead of Rivera, who ripped a grounder down the left-field line to knot the game at 3-3. The Diamondbacks mounted a threat against Street as Cody Ross singled to open the ninth and Eric Chavez drew a two-out walk, but Gerardo Parra grounded out to end it.

GAME NOTEBOOK: The Padres, who rank last in the majors with 84 runs, scored more than three for only the 10th time in 32 games. … The Diamondbacks, whose rotation entered Sunday with a major league-worst 5.81 ERA, saw their starting pitchers' scoreless streak of 21 1/3 innings end on Denorfia's two-out single in the third. … San Diego RHP Tyson Ross, who was charged with three runs (one earned) and seven hits over seven innings, lowered his ERA to 1.80 in five career appearances - four starts - against Arizona.