Next Game: at California 4/19/2016 | 7:00 PM

TUCSON, Ariz. – A two-out, two-run, go-ahead, ninth-inning, inside-the-park home run lifted Stanford baseball to a stunning 6-5 win over Arizona on Sunday at Hi Corbett Field.

Trailing by one and down to the final out, sophomore Quinn Brodey launched the first pitch he saw to the deepest part of the park.

The ball bounced just in front of the 405-foot marker in right centerfield, and just out of reach of the right and center fielders, who each collided with the wall. The ball ricocheted off the angled wall, and away from both outfielders. Freshman Nico Hoerner, who had reached with his career-best fourth hit of the game, easily scored the tying run from second. Brodey raced around the bases and was waved home by third-base coach Jon Karcich. He touched home plate -- well before the ball arrived -- and touched off a wild Cardinal celebration.

Stanford trailed 5-1 in the eighth inning and had scored just three runs in the entire series to that point. But the Cardinal rallied for three in the eighth, and won it with the improbable finish.

Sophomore Colton Hock, who entered in the eighth, retired the Wildcats in the ninth to earn the victory. Sophomore Andrew Summerville allowed just one earned run in 4.1 innings of relief to keep the Cardinal close.

The Wildcats got on the board early when they loaded the bases with one out in the first. But junior starter Chris Viall allowed just one unearned run on a passed ball. A strikeout and groundout stranded two on the base paths.

Arizona (23-13, 8-7) added to its lead in the second though. A leadoff walk came around to score on a two-out double, and two wild pitches later, it was 3-0.

Stanford had a runner on base in every inning. The Cardinal got on the board in the fourth when junior catcher Alex Dunlap singled to left, advanced on a wild pitch and scored on senior Austin Barr's double over the right fielder's head.

Summerville retired the first nine Wildcats he faced. Arizona did manufacture a run without a hit in the sixth and scored an unearned run in the seventh, but the southpaw reliever allowed just one hit and struck out four.

Stanford's come back began in the eighth. Matt Winaker led off with a walk, Mikey Diekroeger was hit by a pitch and Brodey singled up the middle to close to within 5-2. Diekroeger scored on an error, and Brodey was plated on an RBI groundout by Jonny Locher to make it 5-4.

NOTABLES: Barr registered his first multi-hit game of the year ... Hoerner finished the series 6-for-10 (.600), including some impressive defensive plays as well ... Stanford was also down to its last out and trailing by one before Locher hit a game-winning home run at Cal on April 5.

NEXT UP: Speaking of Cal, another mid-week non-conference matchup looms in Berkeley. The Cardinal won at Evans Diamond with a come-from-behind, three-run ninth inning on April 5, and will be set for the rematch on Tuesday at 7 p.m. The game can be seen on the Pac-12 Networks.