It took 45 seconds.

The pass from Alex Nitzl, a flick to Ben Bender, a ball to Eric Matzelevich. Then a cross into the box, ready for Paul Bin to run on to.

Then, a rash challenge, one that dragged Bin down as he tried to shoot.

The referee showed no hesitation pointing to the spot, and Bin cooly slotted home for a 1-0 Maryland men’s soccer lead.

It was the start of a second half that ran in stark contrast to the first. Through the opening 45 minutes, the Terps struggled to get a foothold while battling a tough Michigan State team, as well as a fearsome wind. But in the second half, with the wind at its back, Maryland changed. And that revitalized second half carried the Terps past the Spartans, 2-1.

“I think it was a complete performance, from top to bottom,” Bin said.

Bin’s goal — his first of two on the day — was the start of a dominant second 45 minutes in which Maryland controlled the game.

Though the Terps enjoyed 63 percent of the possession in the first half, they had little to show for it — save for a Brayan Padilla shot that stung the palms of Hunter Morse. At halftime, coach Sasho Cirovski asked for more from his players.

“We just really asked our guys to just be a little sharper, and to look at a few more combinations and some runs in the channels,” Cirovski said.

[Paul Bin helps Maryland men’s soccer sink Michigan State, 2-1]

His words seemed to work. Maryland turned in a complete second half, getting up early and controlling the game thereafter.

It started with that early goal, the result of a fluid attacking sequence that got four of Maryland’s players involved. The Terps continued to push their advantage from there. Bender set up Johnston, whose shot was blocked.

Brett St. Martin had a wide open header, but mistimed his jump, sending the ball a few inches over the bar. Nick Richardson had a shot, but missed the mark.

For 15 minutes, Maryland looked like an attacking team but had only one goal to show for it. In the 67th minute, Michigan State coach Damon Rensing shuffled his pack. He made three substitutions, bringing on winger Louis Sala, striker Greyson Mercer and attack-minded defender Will Perkins.

For Maryland, the onus was suddenly on defense. The Terps willingly soaked up pressure. The Spartans had proved themselves to be dangerous on crosses, with Luke Morrell notching a headed goal against Indiana. Maryland neutralized that threat, man-marking the six-foot-three Morrell on a corner and keeping him off the ball.

And then, after an extended spell of Michigan State pressure, the second came. Chris Rindov blasted a ball down the pitch, and the Terps took off. Morrell couldn’t reach the ball before it bounced, allowing winger Justin Harris to flick it on to a lurking Bin.

[Maryland men’s soccer picks up road win against Michigan, 2-1]

Bin latched onto Harris’ deft touch, controlling the ball with his right foot before blasting his second goal of the day, sending the Terps into raptures.

“I just said, I’m gonna rip this and see it go through, go in the back of the net — which it did,” Bin said.

The Spartans threw everything at Maryland late, pouring down the pitch in search of life. But Maryland equaled most attacks. Niklas Neumann plucked balls out of the sky. Richardson won tackles. Rindov dominated in the air.

Michigan State’s goal, when it did come with seconds remaining, was a stroke of individual brilliance — a curler from Gianni Ferri into the far corner, a shot neither Neumann nor the rest of the Terps could do anything about.

Though conceding a late goal denied Maryland what perhaps would have been a deserved shutout, it was the only blemish on what was otherwise the best half of soccer they had all season.

And if the Terps can build on that play, produce more of those moments and continue to dictate the game’s pace, that could continue.

“The last three games, we’ve shown that we can play anybody and we can beat anybody any given day,” Bin said. “And if we keep playing like this, I won’t be surprised to see us in the national championship.”