Ohio State’s premier closer, TJ Brock, was giving Maryland baseball a run for its money, sending the game into extra innings.

But when it counted, Brock couldn’t cut it.

The sophomore gifted the Terps a bases-loaded walk after several mishaps, leading to a 5-4 win over the Buckeyes.

Aside from that breakdown, it was a pitcher’s day in College Park.

Headlined by only two hits through the first five innings, Maryland’s Nick Dean and Ohio State’s Seth Lonsway looked unstoppable.

“It’s the first time you get to see Dean do his thing,” coach Rob Vaughn said. “He’s pretty much healthy … he’s outstanding.”

The first hit of the day wouldn’t come until the top of the fifth from a single to center field off the bat of the Buckeyes’ Marcus Ernst. Like the Terps’ previous outing, they had to rely on walks to generate offense, and Maryland had the first chance to score.

“We’ve toned down our offense a little bit,” Luke Shliger said. “We’re not focused on the big hit … just produce runs anyway possible.”

Max Costes and Chris Alleyne both reached third in the second and third innings but the hits weren’t there to bring them home. Fortunately for both of them, they’d get another shot — just not off hits.

[Maryland baseball takes advantage of Ohio State bullpen meltdown in 10-6 win]

After getting walked on a full count in the fifth frame, Alleyne took off from first base on an errant throw, giving him room to run. With his coaches waving him home, it looked to be a race to the plate.

He was just too fast. The senior dove home unscathed and captured a hard-earned opening run of the day for the Terps. Costes would hit a double the next inning and come home off a passed ball.

“When do you have that situation where you’re giving an inch with Lonsway, you got to roll the dice,” Vaughn said.

With one swing of a bat, it was all gone.

Conner Pohl negated the Terps’ pair of runs, driving a momentous two-run homer that tied the game.

Matt Shaw and Shliger gave Maryland its lead back the following inning, each launching one over the fences off of Ohio State’s reliever, Griffan Smith.

With a two-run advantage going into the ninth frame, Maryland turned to Sam Bello on the mound. He struggled out of the gate, loading up the bases on the first three batters.

After a brief mound visit, Bello pitched Scottie Seymour to a full count before walking in a run. A fielder’s choice to Kevin Keister allowed the tying run to score. Bello retired the final batter to end the inning, but the Terps needed to get one more run to take the win.

[Maryland baseball looks to avoid Ohio State’s late-inning freight train, TJ Brock]

The Buckeyes were going to give it their best shot though, slotting in Brock to get it done. He fired a one-two-three inning, and Maryland went to extra innings for the first time this season.

“To see what he did in the ninth surprised me,” Vaughn said. “I thought we were going to get more of the TJ Brock we saw in tenth where it sprayed a little.”

Bello made quick work of the first two batters, but got stuck in a tough spot again, loading the corners up. With Pohl coming to the plate hoping to even the series, David Falco came in to face the first baseman.

Falco was able to get him to ground out and set up the Terps for a game-winner in the bottom of the frame.

Alleyne got on board, putting the go-ahead run on first. Brock hit Shaw with a pitch, and a sacrifice bunt from Ben Cowles put the winning run on third.

Brock intentionally walked Costes, avoiding one of Maryland’s go-to players with runners in scoring position. That backfired, as Brock walked Shliger to give the Terps the walk-off victory.

With the win, Maryland (12-12) evened out its record for the first time all season.

“We’ve put ourselves in a position we haven’t been in all year,” Vaughn said. “We need to come out and finish tomorrow.”