Updated

Alexi Amarista drove in the winning run in the 11th inning as the San Diego Padres took a 3-2 win over the Arizona Diamondbacks in the finale of a four-game series.

With Josh Collmenter (5-5) on the mound, Tommy Medica singled, Jesus Guzman hit a ground-rule double and Nick Hundley was intentionally walked to load the bases. Amarista then punched a single to center to plate the winning run.

"I was waiting on the changeup and I got good contact," Amarista said. "I'm just very happy to win."

Jedd Gyorko and Chase Headley each drove in a run for the Padres, who took three of four in their final home series of the season.

Robbie Erlin gave up two runs on three hits with a walk and seven strikeouts over seven innings in the start. Nick Vincent (6-3) picked up the win for pitching two perfect innings.

Martin Prado hit a two-run home run to account for the offense for the Diamondbacks, who have lost five of their last eight games. Trevor Cahill was charged with two runs and five hits over 5 2/3 innings in the start.

"I didn't feel real great," Cahill said. "My command wasn't there. I tried my best to get through it. It was the story of the season, I guess. I walked too many guys, fell behind too much. I was able to kind of minimize. It's not really where I want to be, but it's kind of been the story the whole year."

The Padres jumped on top in the third inning. Will Venable walked with one out but was quickly picked off. Chris Denorfia then tripled and scored when Gyorko followed with a single. A double by Headley chased home Gyorko for a 2-0 lead.

Arizona, though, tied the game in the fourth as Paul Goldschmidt led off with a single and Prado followed with his 14th home run of the season.

Game Notes

San Diego, which went 45-36 at home this season, plays three games in San Francisco to end the season ... Arizona finished the season 35-45 on the road and plays three at home against Washington to complete the season ... San Diego won 12 of the 19 games against Arizona this season ... San Diego left 11 men on base after batting just 2-for-9 with runners in scoring position.