Updated

San Diego, CA (SportsNetwork.com) - Yonder Alonso's dribbler to first base plated Cameron Maybin in the bottom of the ninth inning to help the San Diego Padres salvage the finale of a three-game set with a 4-3 win over the Arizona Diamondbacks.

Maybin led off the home half of the ninth with an infield single off Oliver Perez (0-1). After Will Venable struck out swinging, Rene Rivera doubled to deep right to put two in scoring position for Alonso, whose grounder to first was slow enough to score the speedy Maybin ahead of Paul Goldschmidt's throw home.

Huston Street (1-0) pitched out of a jam in the top of the ninth to earn the win.

Maybin and Rivera had two hits apiece for the Padres, who halted their four- game losing skid. Rivera drove in two runs, while Maybin scored twice in the triumph.

"It's huge, you never want to get swept in a series," said Maybin. "We've been playing some really tough, close games. We continue to compete and play hard."

Goldschmidt went 2-for-3 with a home run for Arizona.

Starters Wade Miley and Tyson Ross both allowed three runs over seven innings. Two of Ross' runs were unearned because of Padres shortstop Everth Cabrera's error in the fourth.

Chris Denorfia's RBI single in the home half of the third gave the Padres a brief 1-0 lead, but it wouldn't hold up as Goldschmidt and the D-backs tacked on three runs a half-inning later to go in front.

Arizona's star knotted the score with a solo blast to center to lead off the frame. Ross then got a pair of quick outs, but Cabrera's error on Cody Ross' grounder kept the inning alive. Ender Inciarte followed with a single to left, both runners advanced on Rivera's passed ball and Tuffy Gosewisch plated two with his single to center.

Rivera redeemed himself with a two-run double down the third-base line, plating Maybin and Venable for a 3-3 score. With two outs in the inning, Maybin and Venable slapped consecutive singles to set up Rivera's timely lace to left.

"They gave me three runs and I went in there and gave up some runs," said Miley. "I needed that inning to shut the door and I let them answer right back, giving them the momentum back."

Both pitching staffs prevailed over the next four-plus innings, preserving the tie until the Padres manufactured the winning run in the bottom of the ninth.

Game Notes

Arizona's three-game winning streak ended ... Gerardo Parra had two hits for the D-backs, who hit just 1-for-5 with runners in scoring position and left seven on base ... Arizona's nine-game road trip continues with a three-game set in Milwaukee starting on Monday. The Padres continue their 10-game homestand when they host Kansas City on Monday.