Just 30 seconds after Maryland men’s soccer took a 1-0 lead at Coastal Carolina on Sunday, the score was back even. Terps defender Johannes Bergmann gave Chanticleers midfielder Jeranimo Power a little too much room inside the box, and Power punched the ball past goalkeeper Dayne St. Clair.

As Bergmann held his hands to his hips and stared at the ground, St. Clair immediately called his teammates into a huddle. The junior netminder wanted to ensure Maryland wouldn’t lose faith after allowing a second brutal equalizer of the past three games.

It seemed to work; the Terps scored two goals later in the second half to take down then-No. 18 Coastal Carolina, 3-1, for the most impressive win of their season thus far.

After blowing a lead in the 90th minute and losing Sept. 21 against Wisconsin, Maryland has won two straight games in convincing fashion. The mid-game pep talk last weekend was another example of the team having a short memory.

“We knew that we were playing well,” St. Clair said. “We just said, ‘Don’t panic. We just scored one.'”

[Read more: Maryland men’s soccer earns best win of the year, 3-1, over No. 18 Coastal Carolina]

A week earlier, the Badgers turned their last-minute equalizer into an overtime win. But on Sunday, Maryland regrouped, fueled by the knowledge that it was dominating possession and had surrendered only one shot on goal the entire afternoon.

St. Clair wasn’t asked to make a save for the remainder of the game, and the attack kept pressuring, resulting in Maryland’s first win over a ranked opponent in 2018.

“It’s a sign of maturity,” coach Sasho Cirovski said. “That Wisconsin loss was really tough on all of us, but we filed it. We moved on with a good result at Rutgers and then an ever better performance and result at Coastal.”

[Read more: Eli Crognale has taken over as Maryland soccer’s set piece specialist]

Cirovski was proud that his team didn’t finger-point and place blame after the costly moment of complacency. He was hoping the pain from the Wisconsin loss would be repurposed for positive responses in the future, and that came to fruition against the Chanticleers.

Forwards Justin Gielen and Sebastian Elney scored in the 78th and 80th minutes, respectively, and secured Maryland’s fourth win in its last five games.

It was also the second time in recent weeks that Maryland had to respond late to pull out a win. The Terps found themselves down a goal in the second half against Northwestern on Sept. 14 but scored with less than seven minutes left before winning in overtime.

St. Clair’s leadership against the Chanticleers made it easier for Maryland to pull off another comeback.

“He definitely kept us on ground and kept us focused,” said forward Paul Bin, who notched two assists in the win. “But not just Dayne, everyone on the team in general. We regrouped, gathered ourselves and found a way to win.”

The victory moved Maryland above .500 for the first time this season. As the Terps enter a daunting late-season slate with four ranked opponents in their last seven games, they’re picking up momentum.

And after Coastal Carolina seemed to disrupt Maryland’s rhythm, St. Clair stepped up and helped the Terps return to College Park with the result they deserved.

“He’s a captain for a reason,” Cirovski said. “He did a great job there. We exhaled for a second, and we let them right back into the game. It was very good to see the group react in a positive way.”