No. 24 Maryland baseball wasn’t even through a single at bat in its first NCAA tournament game in four years without running into trouble. During his leadoff at bat, Chris Alleyne took a hard swing from the left-handers’ side of the batter’s box and fouled Andrew Lindsey’s pitch off his face.

His eye began to swell. And after a long pause, the Big Ten’s stolen base leader had to make an early exit.

This was just the first at-bat in a high-scoring, nearly four-hour marathon in Greenville, North Carolina. One where double-digit runs weren’t enough for the Terrapins, who suffered a 13-10 defeat by No. 20 Charlotte in their opener at the Greenville Regional.

“A really weird game overall,” manager Rob Vaughn said. “I’ve never seen what happened there, with Bubba [Alleyne] to lead off the game is kind of a wild thing and a pretty big gut punch for everybody there for a little while.”

The Terps struck first as first baseman Maxwell Costes went the other way, jacking an opposite-field home run off the Lewis Field scoreboard to give Maryland a 1-0 lead.

Charlotte had an answer in the home half of the second inning. After designated hitter Will Butcher smacked a base hit into left-center field that was stretched into a double, Jack Dragum launched a two-run homer to right field — giving the 49ers their first lead, 2-1.

[Maryland baseball is ready to ride its hot streak into NCAA tournament]

Terps’ starting pitcher Jason Savacool ran into some trouble in the bottom of the third, as the Niners loaded the bases with one out. But the All-Big Ten freshman limited the damage, only surrendering a run on a LuJames Groover sacrifice fly.

“The Groover kid can really, really hit,” Vaughn said. “That guy is a really good player and he’s young. That guy’s gonna be a special kid for them.”

Maryland put pressure on Lindsey in the top of the fourth, getting a pair of runners in scoring position with one out. Tommy Gardiner chopped a bouncing ground ball to the right side of the infield and bolted to first — beating it out and allowing Costes to score his second run of the day.

Lindsey suffered an injury as he headed to cover first on the play, forcing him to leave the game after just 3 1/3 innings. Charlotte turned to its best reliever in Christian Lothes, who had a team-leading eight saves and a 2.72 ERA.

Schreffler greeted reliever Christian Lothes with a bunt up the first-base line as Luke Shliger trotted home from third — knotting the game at three.

However, the seesaw battle continued. With two runners already on board, Todd Elwood bunted toward third and hustled down the line. Gardiner made an errant throw to first that sailed beyond Costes, and Nate Furman came around third and notched the Niners’ fourth run.

“The game in general was sloppy,” Vaughn said. “My goodness, that was just a sloppy baseball game.”

The fourth inning didn’t get much friendlier for Savacool. He threw 32 of his 80 pitches in that frame, and once Charlotte loaded the bases with one out, manager Rob Vaughn pulled the plug on the freshman.

The 49ers welcomed reliever David Falco with thunder. After a sacrifice fly to deep center field, where Schreffler made an impressive catch, Groover and Butcher collected back-to-back RBI hits. Charlotte batted around and opened up an 8-3 lead.

After that long bottom of the fourth, Lothes walked three straight hitters. Austin Marozas came into pitch for the 49ers and Maryland began to claw into the big lead.

Matt Shaw scored on a Costes fielder’s choice, and Ben Cowles scored on a wild pitch. Shliger swung through a fastball to end the inning, but not before the Terps made it an 8-5 ballgame.

“There was never really any doubt in my mind that we could come back and win that game,” Costes said. “We just, you know, ran out of time.”

Charlotte added its ninth run on a wild pitch, Maryland was quiet in its half of the sixth. And things got a little chippy in the bottom of the inning as the 49ers continued to blow the game open.

David McCabe crushed a homer to right field. Falco plunked the next batter, Austin Knight, who slammed his bat in disgust as the umpire issued warnings to both sides.

[Maryland baseball returns to NCAA tournament for first time since 2017]

And soon after, Butcher launched a two-run shot to left, giving Charlotte a 12-5 advantage.

Still, Maryland wasn’t done.

In the top of the seventh, Maryland loaded the bases with nobody out after a single and a pair of hit batsmen. Jackson Boss took the mound and the Terps quickly grabbed a pair of runs back.

With two outs in the inning, Maryland had two in scoring position with Gardiner at the plate. The third baseman poked one to right-center field, and Cowles and Costes scored.

Costes pumped his fist after crossing the plate and the Terps put up a four-spot with plenty of baseball left to be played in a game that looked out of reach.

“We were finally getting some momentum back,” Costes said. “You know, doing what Maryland baseball offense does.”

The offensive outburst wasn’t stopping. McCabe clobbered his second home run of the night with a shot to right off reliever Sean Heine, extending the 49ers’ lead to 13-9.

Down to the final three outs, Maryland kept fighting. Bednar blasted a homer to left that made it a three-run affair once again. Then, Charlotte reliever Spencer Giesting walked Costes on four pitches.

But it was too little, too late for the Terps. Giesting got out of the inning, striking out three straight Maryland batters to dash its hopes of winning its first NCAA tournament game since 2017, falling short 13-10.

The Terps showed fight throughout the game. Just like Alleyne has all season.

“When [Alleyne’s injury] happened, it was really, really upsetting. But at the same time, we should be like, ‘all right, he’s out, next guy up,’” Bednar said. “Bubba, he would play hard and not give up, and I think that’s what we did today. We didn’t give up. Just like Bubba wouldn’t give up.”