Maryland baseball held a slim two-run lead over Maine in the top of the eighth inning with the Black Bears threatening to score.

Moments earlier, Maine first baseman Joe Bramanti drove an RBI single through the right side to shorten the lead.

Catcher Ryan Turenne stepped up to bat with two runners on base and a clear chance to further Maine’s comeback bid. But he lined out to Pineiro, who caught the ball and stepped on first base to end the comeback attempt with a double play.

Maryland would ride its lead out through the ninth inning, securing a 5-3 victory over Maine to sweep its doubleheader Friday.

“Guys at the end of the game, they always like to let the coaches’ blood pressure get a little bit high,” coach Rob Vaughn said. “They’re growing, they’re learning, they’re figuring out how to win as a team.”

Despite errors from shortstop AJ Lee and Pineiro to set up the Black Bears’ eighth-inning opportunity, right-hander Zach Thompson’s 6.2-inning, two-run display kept pressure off the Terps’ defense.

Strong pitching from Hunter Parsons helped Maryland baseball coast to a 4-0 win in the first game against Maine. But after surrendering five runs in 3.2 innings last weekend against Coastal Carolina, uncertainty remained for how Thompson would perform in his first outing at Bob “Turtle” Smith Stadium.

But against a winless Maine team (0-6), Thompson found his footing on the mound. Against the Chanticleers, he relied solely on his fastball. So, during the week, Thompson worked on his slider grip and used it to great effect Friday.

He struck out nine batters during his appearance — the most by any Maryland pitcher in a game this season.

“We weren’t really surprised, we knew he had it in him,” third baseman Taylor Wright said. “We needed that from him today and he came up big for us.”

He managed to hold the Black Bears scoreless for six innings, but in the seventh inning, with his pitch count rising, Maine found a way through.

First, Turenne doubled to right field. Second baseman Caleb Kerbs followed Turenne with a single through the left side and Turenne advanced to third. Designated hitter Colin Ridley sealed the deal with his at-bat, though. He grounded out to second base, scoring Turenne and setting up left fielder Jack Roper’s RBI single later in the frame to cut the edge to 4-2.

“I might have been running out of a little bit of steam,” Thompson said. “I kind of started second-guessing myself too and I shouldn’t have. I should have stayed on the gas pedal.”

In the first inning, Justin Vought reached on a bunt down the third-base line, allowing Taylor Wright to advance to second in the process. With two runners on, Maxwell Costes blasted a double into right field to give Maryland (3-2) a two-run lead.

Maryland took advantage of Maine’s mistakes at opportune times. In the bottom of the third inning, Turenne’s throw to third — attempting to nab the stealing Randy Bednar — sailed into left field. Bednar quickly got after his slide and took off toward home to extend Maryland’s lead to three.

“Our timing on our stolen bases was much smarter today,” Vaughn said.

The Black Bears’ faltered again in the sixth inning. Pitcher Ben Terwilliger walked Lee and two pitches later, Terwilliger plunked Cowles. Lee advanced to second. Maryland pushed its advantage, opting to try a double steal with Lee and Cowles. But Cowles, the trail runner, was caught at second.

Still, with Lee on third, center fielder Chris Alleyne drove a single up the middle and Lee trotted home. Another Maryland score in the seventh would secure the lead, despite Maine’s best efforts in the eighth.

“This team’s going to play some tight games,” Vaughn said. “It’s always good to come out on this end of it.”