The Diamondbacks set a major-league record for extra innings played in a single season while taking a 2-1 victory in 12 innings over the San Diego Padres at Petco Park.

The three extra innings gave the Diamondbacks 78 extra innings this season two more than the 1969 Minnesota Twins.

The Diamondbacks scored first on Paul Goldschmidt’s sixth-inning solo homer but the Padres tied it on a passed ball by catcher Miguel Montero in the eighth inning.

Left-hander Wade Miley threw six scoreless innings allowing just four hits and a walk while striking out seven.

Going deep again: Goldschmidt clobbered his National League-leading 36th home run on an 0-2 pitch in the sixth inning.

Goldschmidt got a letter-high fastball at 96 mph from Padres right-hander Tyson Ross and sent it an estimated 402 feet to right-center field an area of Petco Park not normally reached by right-handed hitters.

That gave Goldschmidt a two home-run lead on Pedro Alvarez who is second in the league with 34.

Ross was otherwise untouchable giving up just three hits and three walks in eight innings.

Turning two unconventionally: The Padres might have been benefited from a questionable call but they also might have saved themselves a couple of runs in the top of the sixth inning.

After the Diamondbacks’ Adam Eaton was hit by a pitch to open the inning Willie Bloomquist hit a topper down the first base line. Catcher Nick Hundley made a nice play chasing after it picking it up and flipping underhand to first for the out.

Meanwhile Eaton rounded second and kept on going but first baseman Tommy Medica quickly threw to third where Chase Headley applied the tag. Eaton was called out although replays showed he might have beaten the tag.

Goldschmidt followed with the home run so the Padres might have prevented additional two runs on the play.