Stanford baseball rallied to take the lead with four runs in the ninth, but surrendered four runs in the bottom half to fall 10-9 at San Jose State on Monday night in a nonconference game.
Stanford (12-7) hosts Pac-12 rival USC for a three-game set at Sunken Diamond, beginning Friday at 7 p.m. All three games can be seen on the Pac-12 Network.
Junior Jack Klein followed with an RBI single to right and Stanford added another when freshman Nico Hoerner drew a bases loaded walk.
The Spartans matched the Cardinal's run production in their half of the ninth. The first three batters loaded the bases, and two crossed the plate on wild pitches.
After a strikeout, a single tied the game. Then with two away, a line drive to right-center field scored the game-winner.
The first inning was a precursor. Stanford struck first with a pair of runs. Tommy Edman led off with a walk and Hoerner followed with the first of his three singles on the night.
Sophomore Quinn Brodey, who finished with a career-high four RBI to go along with three hits, brought home Edman. Hoerner scored on a two-out, opposite-field single by freshman Duke Kinamon.
A rare error from the nation's top defense -- just the ninth of the year in the team's 19th game -- led to an unearned run as the Spartans matched Stanford's two-run first.
The Cardinal bounced right back and retook the lead in the next half inning. Junior Matt Decker walked and advanced to third on Hoerner's second single. That set up another two-out RBI single -- this time from Brodey -- for a 3-2 lead.
John Hochstatter pitched the first two innings for the Cardinal, and sophomore Andrew Summerville struck out four in three scoreless innings of relief.
Summerville has not allowed an earned run over his past 15 innings, dating to March 1.
The Spartans capitalized on four hits, a walk and an error to take a 6-5 lead, and set up a wild ninth inning.
The Cardinal's 16 hits were a season high.
Stanford concluded its 2016 season on Sunday by finishing 11th in the National Collegiate Championships held at the Gosman Sports and Convocation Center in Waltham, Mass.
The men's and women's teams combined for a score of 505. Columbia captured the title by tallying 1,125.
The men's competition took center stage during the weekend. Jeffrey Dalli earned Stanford's top showing by placing 15th in the saber.
Darren Mei took 23rd in foil, while Tristen Krueger and Sean Strong wound up 22nd and 23rd, respectively, in epee.
"Our fencers gained a lot of valuable experience at the championships this year and we are looking forward to the future," said head coach Lisa Posthumus.
Stanford will be well represented this week in the ANA Inspiration, the LPGA Tour's first major championship of 2016.
Incoming freshmen Andrea Lee and Albane Valenzuela will compete in the elite pro event that begins Thursday at Mission Hills Country Club in Rancho Mirage.
Lee, of Hermosa Beach, fired a bogey-free 5-under-par 67 on Monday in the ANA Junior Inspiration at Mission Hills Country Club to earn an invitation. She fashioned five birdies and secured medalist honors by three strokes.
Previously, Valenzuela (of Switzerland) received an invitation for the elite 72-hole event.
"Fantastic accomplishment," said Anne Walker, Stanford's head coach. "We couldn't be more excited for both."
Lee also qualified last year. She shot rounds of 73-75 and missed the cut by one stroke.
The highly touted class of Lee, Valenzuela, Madeline Chou and Ziyi Wang all will play for the defending national champion Cardinal next fall.