Shortstop Didi Gregorius tripled past Padres rookie first baseman Kyle Blanks to drive home Chris Owings with one out in the top of the 12th Tuesday night to give the Arizona Diamondbacks a 2-1 win over the Padres before the remnants of a turnout of 18,562 at Petco Park.

Rookie second baseman Owings doubled over the glove of Padres left fielder with one out in the 12th.

Gregorius immediately pulled a Luke Gregerson slider just inside the first base bag for the decisive RBI.

The fans who stuck around saw a pair of major league records set. The game was the record 239th extra-inning game played in the major leagues this season. And Arizona has played 78 extra innings this season, topping the record of 76 played by the Minnesota Twins in 1969.

Although they tied the game in the bottom of the eighth, the Padres again wasted an excellent pitching performance by Tyson Ross, who allowed one run on three hits and three walks while throwing only 90 pitches over eight innings.

"We've seen this before," Padres manager Bud Black said of Ross's performance. "It's really encouraging how he's throwing the ball. It's great. He's made great strides this season in a number of areas."

Unfortunately, the Padres offense hasn't -- particularly when Ross pitches. The Padres got only six hits Tuesday night while striking out 17 times in 12 innings. The Padres are hitting .149 (24-for-161) through the first five games (2-3) of their final homestand while scoring seven runs.

The Padres have scored only 12 runs behind Ross while he's been in the game over his last 11 starts and his 1.59 run support average is the lowest in the major leagues among pitchers with 50 or more innings since the All-Star break.

The Padres tied the game at 1-1 in the bottom of an unusual eighth when pinch-runner Reymond Fuentes scored on a passed ball by Arizona catcher Miguel Montero one pitch after a controversial call by plate umpire Alan Porter denied the Padres the tying run.

The Padres, who entered the bottom of the eighth scoreless and with only four hits in six innings off Arizona starter Wade Miley, got back-to-back singles from pinch-hitter Mark Kotsay and Chris Denorfia to open the inning.

But Diamondbacks reliever David Hernandez struck out Jesus Guzman after the left fielder unsuccessfully attempted to bunt the runners into scoring position. Jedd Gyorko did advance the runners on a topper back to Hernandez. Hernandez intentionally walked Chase Headley to bring up rookie first baseman Tommy Medica.

Hernandez apparently hit Medica on the right forearm with a 2-and-2 fastball to force in the tying run. But Porter ruled the ball was fouled off by Medica. After an appeal by Black and an umpires’ conference, Porter’s call stood.

However, Hernandez’s next pitched sailed past Montero with Fuentes sliding home under the tag of Hernandez to tie the game.

The one mistake made by Ross nearly beat him.

National League home run and RBI leader Paul Goldschmidt drove a shoulder-high fastball 402 feet into the seats in right-center to snap a scoreless tie in the sixth inning.

Ross jumped ahead of Goldschmidt with two straight strikes before throwing a 95-mph fastball that the right-handed first baseman drove into the seats where the Jack Deck boxes meet the sand.

"It caught some of the plate," Ross said of the 0-and-2 fastball to Goldschmidt. "I need to make a better pitch."

The homer was Goldschmidt’s 36th of the season and produced his 124th RBI. It was also the third homer allowed by Ross over his last nine starts.

The hit was one of three mustered by Arizona against Ross over eight innings. Ross issued three walks and struck out six as he lowered his earned run average in 12 starts since returning to the rotation coming of the All-Star break to 2.80.

"I think I'm just trying to build off each start," said Ross. "I'm growing as a pitcher. I'm looking forward to my next start."

Ross retired 10 straight after working his way out of a second-inning jam.

Martin Prado led off the inning with a single and advanced to third on Gerardo Parra’s one-out double. But Ross struck out rookie Chris Owings and Miley around an intentional walk to Didi Gregorius.

Ross hit Adam Eaton to open the sixth. Eaton, however, was eliminated on an unusual double play. He tried to advance to third on Willie Bloomquist’s infield out and was thrown out at third by Medica.

Goldschmidt’s second homer against the Padres this season followed the double play.

The Padres first two hits Tuesday night were infield singles by the slumping Alexi Amarista (ending a drought of 31 straight hitless at-bats) and Blanks (who had one hit in his previous 14 at-bats). The first Padre to reach the outfield with a single was Ross in the fifth.