While warming up before every game this season, Maryland baseball left-hander Robert Galligan visualizes the situations he might face.

He imagines, for example, standing on the mound pitching against a left-handed batter with the bases loaded, executing his pitches to escape the jam.

That preparation has helped Galligan prepare for a new role this season. Last year, Galligan mainly pitched long relief. This year, though, he’s entered games in the middle of innings to get his team out of difficult situations.

This past weekend against Minnesota, he showed his knack for that role, as he entered the games on Friday and Sunday with at least one runner in scoring position after the Terps’ starters faltered. Galligan didn’t allow a run in either appearance at Siebert Field.

“Every guy’s role is different,” said Galligan, who holds a 2.91 ERA. “For me, it’s understanding that I need to get a lefty out in a big spot. When I come into the game, I’m already ready for it and I’ve already visualized my success.”

Last season, Galligan pitched the second-most innings on the team (62.1) despite mainly throwing out of the bullpen. With relief options in right-hander Kevin Mooney and left-hander Alex Robinson, who both posted ERAs under 1.90 in 2015, the Terps didn’t need Galligan late in games.

Mooney and Robinson turned pro after last year, however, so coach John Szefc put together a new plan for the bullpen this season. Szefc said right-hander Mike Rescigno and left-hander Zach Guth are best when starting an inning, while Galligan and right-hander Ryan Selmer are best at minimizing damage in the middle of innings.

In Maryland’s 9-5 loss to the Golden Gophers on Friday, Galligan entered in the sixth with a runner on third and the Terps clinging to a 3-2 lead after right-hander Taylor Bloom allowed two runs. Though four other relievers gave up seven runs in the eighth inning, Galligan got the final out of the sixth frame to maintain the Terps’ lead.

Galligan entered the contest in a similar situation two days later in Maryland’s 6-4 loss. After right-hander Mike Shawaryn allowed three runs in the seventh, Galligan replaced him with a runner on second and the Terps holding a 4-3 lead. The Syosset, New York, native then struck out left-handed second baseman Connor Schaefbauer to end the frame.

“That’s his job to get us out of that situation, and he did,” first baseman Kevin Biondic said. “It’s good to have a guy like that and teach the younger guys how it’s done.”

Galligan said his mentality has helped him thrive in his new role. The 6-foot-4, 218-pound hurler focuses on one pitch at a time, and he said he doesn’t worry about his past trips on the mound or when he’ll pitch in the future.

“When you come into the game, you have to be ready to get the first guy out,” Galligan said. “If [associate head coach Jim] Belanger takes you out after one guy, then your day is done. If not, you’re ready to go for the second guy. If you try to look too far in advance or try to look in the past, the results probably aren’t going to be what you want them to be.”

This season, the Terps have struggled to find answers in their bullpen. Galligan is the only reliever with an ERA under 4.30.

So the Terps have relied on their starting pitching, as two of the team’s weekend starters have ERAs below 2.60. But when those starters can’t perform deep into the game like Friday and Sunday against the Golden Gophers, Maryland has struggled.

So Galligan hopes to be a mentor for the seven freshmen in the bullpen by continuing to stay composed in pressure situations.

“That’s really his thing,” Szefc said. “He’s got as much experience as anyone we have. Hopefully down the stretch he can take advantage of that.”