Brian Ragira's two-run single in the top of the 11th inning helped give Stanford a 9-8 victory over host Arizona State on Friday night in a Pac-12 Conference game.
Sam Lindquist (2-1) had to grind through 4 1/3 innings of relief, getting the final out with the bases loaded in the bottom of the inning, to record the victory.
He needed 27 pitches in the 11th to record three outs. Lindquist finished allowing the one run on three hits. He walked two and struck out two.
Stanford (11-9, 26-15) and the Sun Devils complete the series at noon Sunday.
The Cardinal moved into a fourth-place tie with Arizona State, both teams two games behind UCLA and 5 1/2 games behind second-place Oregon.
Stanford has 10 conference games remaining, seven against teams either tied or ahead of it in the standings.
Arizona State took a 7-4 lead into the seventh inning. Austin Wilson's three-run homer tied the score.
Stanford loaded the bases, with one out, on walks to Brant Whiting, Justin Ringo and Austin Slater in the top of the 11th. Ragira followed with his two-run single.
Slater hit a two-run home run in the first inning to put Stanford ahead, 2-0.
Lonnie Kaupilla and Whiting also drove in runs for Stanford, which won its third straight and have won 10 of its last 15 games.