Maryland baseball huddled together near first base at the conclusion of Sunday’s loss at Michigan.

Coach Matt Swope stood in the center of a bevy of gray Terps jerseys and red hats after their first Big Ten series defeat in nearly three years. His message was clear.

“This is the first time we faced any adversity … it’s not going to be the last,” Swope said. “It’s really about how you respond in these types of moments that matter as a team.”

The Terps fought through and overcame obstacles on Wednesday against UMBC with a 13-12 comeback victory that highlighted Swope’s message of maintaining the team’s focus in difficult situations.

Maryland trailed by four entering the eighth inning after gaining an early seven-run lead. A two-run eighth frame decreased the deficit before Chris Hacopian brought it within one in the ninth.

Sam Hojnar knocked in a pair of runs with the bases loaded and two outs to secure the Terps’ come-from-behind victory and walk-off the Retrievers.

“The guys never believe that they’re down. They proved that again,” Swope said Wednesday.

[Maryland baseball falls to Michigan, 9-4, drops first Big Ten series in nearly three years]

The Terps were scoreless between the fourth and seventh inning after the early outburst. But they reverted back to their earlier success with five runs in the final two frames to clinch their 12th comeback victory in 29 games.

Hojnar credited Maryland’s late-game comfort to their confidence in all portions of the lineup. Six different Terps reached base in the final two innings of the contest to spur the rally.

“We’ve had so many opportunities to look back on with so many different guys getting involved and having big hits,” Hojnar said.

The Terps posted a season-low one run on Saturday in the second game of their series against the Wolverines. Maryland’s bats increased production slightly Sunday with a trio of home runs, but the offense couldn’t maintain its success. The Terps went down in order three times and left five runners stranded.

Hojnar emphasized the team was frustrated, but didn’t dwell on the disappointing weekend and shifted their focus to the upcoming slate.

[Meet Evan Johnson, Maryland baseball’s No. 1 fan]

Pitching coach Jimmy Jackson echoed the same sentiments after Maryland surrendered 12 runs for the second time in three games. It was a string of uncharacteristic performances from the group that holds the third-best ERA in the Big Ten.

The coach attributed the struggles to falling behind in counts and not locating pitches well when they got ahead of batters.

“We got to walk away thinking positive because we won,” Jackson said. “They [must] continue to stick to the process.”

Swope stresses the importance of exiting each week with a winning record. The Terps missed that for the first time this year last week with a .500 stretch.

They inched toward that goal with the win Wednesday night. The next test comes as Indiana travels to College Park for a weekend set. The Hoosiers were picked to finish second in the Big Ten preseason poll but now aim to rebound from a rough start to the season.

“It was important that we got to win after facing some of that adversity,” Swope said Wednesday. “You just try to stay positive and understand it’s not always going to be great.”