ASU had a chance to get a run off of Stanford starter Brett Mooneyham in the first inning when Drew Maggi singled, stole second and was balked to third with one out.
Mooneyham kept the Sun Devils off the scoreboard by fanning Kole Calhoun and Riccio Torrez to end the threat.
Colin Walsh helped his starter in the bottom of the first inning by launching his team leading seventh home run of the season to put the Cardinal (30-22, 13-12) up 1-0.
ASU answered back in the second inning to tie the game on an RBI double by Deven Marrero that scored Zach Wilson, who reached on a double to start the inning.
Back-to-back doubles by Jake Schlander and Dave Giuliani to start the bottom of the second gave Stanford back the lead, but only for the time being.
With two outs in the third, ASU mounted some offense to tie the game at 2-2. Calhoun drew a walk and Riccio Torrez followed with a base hit, before Wilson brought home Calhoun with a single back up the middle.
The Sun Devils loaded the bases with one away in the fourth inning and Zack MacPhee brought home a run with a sacrifice fly to put ASU up 3-2.
While ASU could have capitalized for more runs in the third inning, that one run was plenty for Blair and the bullpen.
Blair worked through the sixth without allowing another run, but it wasn't easy. He managed to work out of a bases loaded jam in the fourth and stranded two more Cardinal runners in the fifth.
Mitchell Lambson took over to start the seventh inning and worked 2 1/3 scoreless innings, without allowing a hit.
The Sun Devils got an insurance run in the ninth inning on an infield single by Johnny Ruettiger that scored MacPhee.
Lambson got the first out of the ninth, before giving way to Jordan Swagerty who got the final two outs of the ballgame. That gave Swagerty his 13th save of the season, setting the record for saves in a season at ASU.
Blair allowed just two earned runs in six innings in his final start of the regular season. Barring another appearance this weekend, Blair will finish the regular season a perfect 11-0.
Maggi, Wilson, Marrero and Ruettiger all finished with two hits apiece for ASU.
ASU and Stanford will continue their series tomorrow in Palo Alto tomorrow at 5:30 PM. Junior Merrill Kelly will get the start for the Sun Devils.