Maryland men’s soccer entered halftime against Michigan State with a two-goal advantage, the first time all season the Terps led by two goals after 45 minutes.

But in a stark contrast from the rapid attack and sustained possession Maryland played with in the first half, it squandered its lead in the second half and drew the Spartans, 2-2.

The untimely collapse cost the Terps their first Big Ten victory of the season, losing them two points in the conference standings. They will need at least one win in their final two conference fixtures in addition to other results going their way in order to earn a spot in the conference tournament.

“We’re still barely alive, and we’re going to keep kicking,” coach Sasho Cirovski said.

The Terps began Sunday’s match after scoring a season-high six goals against Villanova. Maryland’s attack looked to have finally started clicking in front of goal, an offensive cohesiveness that continued in the first half at Michigan State.

Kimani Stewart-Baynes raced down the left sideline with the ball on the Terps’ opening attack just two minutes into the contest. His speed created multiple early opportunities for Maryland’s attack.

[Maryland men’s soccer surrenders two-goal lead in 2-2 tie with No. 19 Michigan State]

The Terps entered the box and scored their first goal of the match seconds later. Luke van Heukelum headed in a Kento Abe cross to put them ahead. It was the earliest goal Maryland has scored all season.

Stewart-Baynes again drove down the left flank 15 minutes later. On this attack he shot, forcing Spartans goalie Zac Kelly to make a save. Max Riley tapped in the rebound off the deflection to double Maryland’s lead.

Cirovski credited the first half attacking efficiency to the continuity of playing Stewart-Baynes, van Heukelum, Riley and Stefan Copetti together for the second straight game. Maryland produced seven shots in the first half but a mere three in the second.

The diminished offensive performance came as the Terps created scoring chances off counterattacks but failed to take advantage of the odd man rushes.

After Michigan State scored its first goal in the second half, Maryland nearly responded. Riley passed to van Heukelum, who sprinted into the Terps attacking half with Copetti striding by him.

Van Heukelum tried a pass to Copetti that failed. The freshman’s feed was too far ahead of his intended target, and the Spartans lone defender easily cleared.

[Freshman Leon Koehl, with veteran aid, is starring for Maryland men’s soccer]

The Spartans came out with more energy, Cirovski said, and won the possession battle. Michigan State scored in the 59th minute.

William Kulvik had the ball at the midway stripe. As he attempted to find a teammate, Jake Zugay stepped in his path. The Spartan midfielder nicked the ball away from Kulvik. The turnover proved costly as Zugay led a Spartan breakaway that Jake Spadafora scored on.

“They threw numbers forward. They went to a back three and threw an extra player inside of the midfield,” Cirovski said. “We looked like we just lost our legs a little bit.”

Michigan State upped the pressure as the Terps tired.

Will Eby sent a shot flashing over the crossbar after a Michigan State corner, and Bjarne Thiesen made a goal-saving block three minutes later.

But Maryland’s defense eventually succumbed under its weighty burden. Jonathan Stout headed a cross past Maryland goalie Mikah Seger to level the score in the 77th minute.

“When you’re forced to defend as much as we did in the second half, you’re bound to make some mistakes,” Cirovski said. “That leads to other teams opportunities,” Cirovski said.

The Terps’ failure to secure three points keeps them at the bottom of the conference. Maryland would have tied Ohio State for eighth place with a win, but instead trail the Buckeyes by two points for the coveted final spot in a postseason that’s rapidly slipping away.