MORGANTOWN, W.Va. — The largest crowd in West Virginia baseball history had dwindled considerably by the time reliever Zach Ottinger appeared to give up a critical mistake in a tie game.

Pitt’s Gregory Ryan led off the seventh with a triple, and Ottinger, a freshman from Marietta, Ga., faced a difficult jam.

But then he struck out Sky Duff, and despite first baseman Kevin Brophy mishandling a throw, Ryan decided not to head home against the drawn-in infield. That proved costly when Ottinger struck out the next two batters, exiting the mound with a fist pump into his glove.

The Mountaineers ultimately broke the deadlock when Brophy’s sac-fly scored Darius Hill in the eighth for a 5-4 win, their third straight, before a record 3,487 fans Wednesday night at Monongalia County Ballpark.

“That’s stuff you dream about right there, doing it in front of that crowd,” Ottinger said. “It was pretty amazing.”

In escaping the leadoff triple, Ottinger (1-0) trusted his stuff and used the confidence instilled from catcher Ivan Gonzalez to work through it.

“When you’ve got a guy like Pudge back there, it makes everything a little easier,” Ottinger said. “I just threw what I thought would work in that situation and it did.”

Brophy drove in three runs for West Virginia (17-11, 2-4). In the second inning he socked a two-run opposite-field home run into the visitor’s bullpen beyond left field.

Austin Davis and Tyler Doanes tacked on RBIs for a 4-1 lead that chased Pitt starter Christian Camacho.

That’s the where the score stayed as WVU starter Nick Snyder worked five innings of one-hit ball. But Pitt (8-19, 2-11) tied it in the sixth against Dillon Meadows when first baseman Bryce O’Farrell hammered a three-run shot into the driveway of the Marriott Courtyard across the street.

Pitt has dropped 16 of its last 18, and the hard luck continued when it failed to capitalize against Ottinger.

“Zach Ottinger stepped up tonight — a freshman who has little experience and in front of a crowd like this? It’s always tough,” Brophy said. “He stepped up and did his job. It wasn’t so much our offense tonight but him instead. That’s what got the momentum into our dugout.”

Tempers flared immediately after the Mountaineers took the late lead when Pitt’s Dan Hammer drilled Andrew Zitel on the next pitch. Hammer was ejected and both benches needed to be calmed down by coaches and umpires. West Virginia pitchers hit four Pitt batters earlier in the game, but none of the Mountaineers were tossed.

Closer Sam Kessler struck out two in the ninth to earn his fifth save.

WVU coach Randy Mazey suggested it may be difficult to keep Snyder in the midweek rotation if he continues to deliver a 1.75 ERA.

“Sometimes the best way to coach a guy is to shut your mouth and to let him be who he is,” Mazey said. “I think we squeezed [Snyder] a little bit last year and tried to turn him into a robot. We just gave him some freedom to be himself this year and he’s just super, super serious about what he does.

“He’s just turned into the Nick Snyder we thought we were going to get.”

West Virginia outhit the Panthers 8-3, with Paul McIntosh producing the only multi-hit game.

Chase Smith (1-2) was the loser, giving up Hill’s leadoff double in the eighth. McIntosh advanced Hill to third base with a groundout to second base.

West Virginia won its fifth straight in the series and improved to 9-1 at home this season.

“We put a good product on the field tonight,” Mazey said. “Our kids are fun to watch. We run, we smash baseballs, pitchers attack the zone and it was a great competition.

“Pitt came out here and gave us all we could handle tonight, but we have had a tendency to score runs late in the game in our park. This is starting to turn into a pretty big home field advantage, and the record crowd had a lot to do with that tonight.”

The Mountaineers head to Oklahoma State for a weekend series in Stillwater.