SAN DIEGO -- Didi Gregorius tripled home the tiebreaking run in the 12th inning to lift the Arizona Diamondbacks over the San Diego Padres 2-1 on Tuesday night.
Paul Goldschmidt hit his NL-best 36th homer for the Diamondbacks, extending his hitting streak to 14 games and increasing his league-leading RBI total to 124.
Gregorius tripled down the right-field line against Luke Gregerson (6-8) to score fellow rookie Chris Owings, who doubled with one out.
The Diamondbacks set a major league record for most extra innings played in a season with 79. Arizona, which is 17-7 in extra-inning games, broke the record of 76 set by the 1969 Minnesota Twins.
Arizona was working on a four-hitter with a 1-0 lead into the eighth before San Diego tied it.
Relief pitcher David Hernandez gave up consecutive singles to pinch-hitter Mark Kotsay and Chris Denorfia to open the inning. The right-hander then struck out Jesus Guzman, retired Jedd Gyorko on a grounder and intentionally walked Chase Headley to load the bases.
Arizona starter Wade Miley allowed just four singles, including two infield hits, in six innings. Miley, making his career-high 32nd start, struck out seven, walked one and let just one runner reach third base.
Tyson Ross kept San Diego in the game with eight strong innings, allowing one run and three hits. Ross struck out six, walked two, hit a batter and threw a wild pitch.
Goldschmidt's homer to right-centre in the sixth barely cleared the top of the wall.
Miley lost all four of his previous starts against San Diego this season.
NOTES: During his hitting streak, Goldschmidt has six doubles, five homers and 17 RBIs. ... Padres SS Ronny Cedeno wasn't in the lineup after being hit in the head by a pitch from reliever Heath Bell on Monday night. "He's not doing great," San Diego manager Bud Black said. "The doctors said (Monday) night he was concussed to a certain point." ... Padres OF Will Venable (abdominal strain) missed his second straight game. ... Diamondbacks RHP Randall Delgado (5-6, 3.96 ERA) faces Padres RHP Ian Kennedy (6-10, 5.06) on Wednesday night.