Jonny Locher’s 2-run HR in 9th lifts Stanford over Cal

Recommended Video:

By the time he rounded third base late Tuesday night, Jonny Locher saw his Stanford teammates gathered in front of the dugout.

The senior right fielder strode across home plate and was engulfed by a scrum of red. His two-run, ninth-inning homer proved the difference in Stanford’s 8-6 nonconference win over No. 9 Cal at Evans Diamond.

It snapped the Bears’ winning streak at seven games. The Cardinal, third in the Pac-12 standings at 4-2 (15-8 overall), have won five of their past seven games.

“I was just trying to stay relaxed, stay up the middle,” Locher said. “I just felt really comfortable and tried to put a good swing on it. Honestly, it was one of those swings where when I took it, I could hardly feel the ball. It just felt so great.”

With two outs in the Stanford ninth, designated hitter Brandon Wulff hit an RBI single up the middle to knot the game 6-6. Locher, who pinch hit two innings earlier, then belted the second pitch he saw over the left-field wall.

“Jonny’s a simple guy who goes up and hits,” Stanford starter John Hochstatter said. “You don’t expect that kind of thing to happen. So when it does, it’s fun.”

It was a rare implosion for Cal closer Erik Martinez, who entered Tuesday with a 1.84 ERA in 13 appearances. Cal still had a shot at a comeback. Catcher Brett Cumberland hit a deep flyball, only for left fielder Quinn Brodey to dive for the catch.

Cal starting pitcher Tanner Dodson (19) flips the ball to first base for the out in the first inning as the California Golden Bears played the Stanford Cardinal at Evans Diamond in Berkeley, Calif., on Tuesday, April 5, 2016. less Cal starting pitcher Tanner Dodson (19) flips the ball to first base for the out in the first inning as the California Golden Bears played the Stanford Cardinal at Evans Diamond in Berkeley, Calif., on Tuesday, ... more Photo: Carlos Avila Gonzalez / The Chronicle 2016 Buy photo Photo: Carlos Avila Gonzalez / The Chronicle 2016 Image 1 of / 7 Caption Close Jonny Locher’s 2-run HR in 9th lifts Stanford over Cal 1 / 7 Back to Gallery

Brodey complemented his highlight catch with three hits and two RBIs.

Hochstatter, in his third start back from Tommy John surgery, allowed three earned runs in three innings, but Stanford’s bullpen hardly cracked against the Pac-12’s most potent offense.

In the first inning, Devin Pearson scored the game’s first run when Stanford third baseman Mikey Diekroeger bobbled Cumberland’s grounder. Moments later, Brenden Farney’s fielder’s choice put Cal up 2-0.

The Cardinal scored a run in each of the next two innings to even the score. After Cumberland’s RBI single in the bottom of the third, second baseman Nico Hoerner gave Stanford a 4-3 lead on a two-run, infield single.

On a Nick Halamandaris bunt in the sixth inning, Stanford left-hander Kris Bubic brought his second baseman off the bag with a wild throw. That put runners at second and third with no outs.

Preston Grand Pre’s fielder’s choice brought home a run. Later, an RBI single by center fielder Aaron Knapp put the Bears up 5-4.

In the seventh, Brodey’s double off the center-field wall scored Diekroeger from first base.

The Bears totaled nine hits against three Stanford left-handers and righty Colton Hock. It was a fitting appetizer for this weekend, when Cal (18-7, 7-2 Pac-12) will face three left-handed starters at Oregon.

Cal fell three victories shy of tying last season’s longest winning streak. Friday’s matchup against the Ducks marks the start of a seven-game road trip, one that could pad the Bears’ conference lead. Both of Cal’s Pac-12 opponents in that span, Oregon and Arizona State, are near the bottom of the Pac-12 standings.

Stanford opens a three-game series at UCLA on Thursday.

Connor Letourneau is a San Francisco Chronicle staff writer. Email: cletourneau@sfchronicle.com Twitter: @Con_Chron