SAN DIEGO — Christian Villanueva had a walk-off pinch-hit single in the ninth inning, and the San Diego Padres ended a five-game skid with a 7-6 win over the Arizona Diamondbacks on Saturday night.

Travis Jankowski led off the ninth with a walk against Andrew Chafin (1-4) and advanced to second on a groundout by Eric Hosmer. Yoshihisa Hirano replaced Chafin and intentionally walked Hunter Renfroe.

Villanueva hit for Craig Stammen (6-2) and drove a 2-2 pitch into left field to score Jankowski and give San Diego its first win against Arizona at Petco Park this season. Stammen worked two scoreless innings.

Paul Goldschmidt had four hits and drove in four runs while tying a Diamondbacks record by reaching base safely in nine straight plate appearances. Goldschmidt also extended his hitting streak to 11 games.

The Diamondbacks' three-game winning streak ended, and their NL West lead over the Colorado Rockies fell to one-half game.

Arizona built an early lead thanks to doubles by A.J. Pollack and Eduardo Escobar. Goldschmidt singled to give the Diamondbacks a 2-0 advantage, a familiar position for a team that leads the majors in first-inning runs with 107.

San Diego evened the score in the fourth with a three-run inning. Goldschmidt doubled home Escobar in the fifth to build a 5-3 lead.

The Padres answered with three more runs in the fifth. Cory Spangenberg's single gave San Diego its first lead of the series at 6-5.

Goldschmidt struck again in the seventh after another double by Pollack, singling against Phil Maton to tie the game.

Both starters struggled. Arizona's Zack Godley allowed six runs on eight hits in five innings. Clayton Richard went five for the Padres, allowing five runs on nine hits.

UP NEXT

Diamondbacks: RHP Zack Grienke (12-8, 3.00 ERA) looks to continue his dominance of the Padres in the finale of the four-game series. Grienke is 11-2 with a 2.10 ERA in his career against San Diego.

Padres: RHP Brett Kennedy (0-2, 11.00) will make his third career start. In his previous outing, he allowed five runs in five innings against the Los Angeles Angels.

___

More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP_Sports