Entering Maryland men’s soccer’s game at Wisconsin on Friday, coach Sasho Cirovski singled out midfielders Amar Sejdic and Eryk Williamson, signaling that they needed to produce more.

Sejdic responded with a pair of first-half goals and Williamson scored a second-half hat trick, providing just enough offense for the Terps to hold on for a 5-4 win despite a late Badgers comeback on a rainy night in Madison, Wisconsin.

“In conditions like that, sometimes the cream has to rise to the top,” Cirovski said. “Both Amar and Eryk were just fantastic.”

[Read More: Maryland men’s soccer outlasts Wisconsin, 5-4, after wild second half]

In Maryland’s previous game, Williamson and forward Gordon Wild missed penalty kicks that would’ve given the Terps a lead over Ohio State.

After beating the Buckeyes with an 85th-minute score, the team explained Wild and Sejdic are the primary penalty kick takers, but if a player like Williamson is feeling confident, he can ask to take the spot kick.

Against the Badgers, however, Cirovski took that decision out of his player’s hands, not wanting to take any chances with an offense that has been inconsistent in front of net this season.

“Before the game, Sasho kind of came to the group huddle and he told me that I was taking the first one for sure,” Sejdic said. “It was good to have his confidence on my side.”

Trailing 1-0, Maryland earned a penalty in the 20th minute. Sejdic looked Wisconsin goalkeeper Philipp Schilling in his eyes and shot to the opposite direction of his dive, moving his career mark on penalty kicks to 5-for-5.

Sejdic then put Maryland up 2-1 in the 36th minute after a cross fell to him in the box. He smashed it into the top corner with the help of a deflection off a defender and a skip off the wet turf.

Williamson, meanwhile, didn’t have his best start. He committed some uncharacteristic turnovers in the first half, he said, and had a prime opportunity in the 13th minute that a defender blocked.

“At halftime, the guys were like, ‘We know what you can do,'” Williamson said. “‘Just pick up the game a little bit more,’ knowing I could produce more.”

Throughout the week, the Alexandria, Virginia, native worked on being more precise in the attacking-third, a request of Cirovski’s.

He entered Friday with three goals on 26 shots, less than 40 percent of which were on target.

In the 69th minute, midfielder Jake Rozhansky drew Schilling off his line and slipped a pass to Williamson.

Instead of going for goal immediately, Williamson took a touch and watched as Wisconsin forward Isaac Schlenker slid past him, trying to block his shot.

Then, facing a goal guarded by two defenders, Williamson deftly lofted the ball into the top netting, out of the Badgers’ reach.

Seventy seconds after his first score, Williamson curled a 19-yard shot inside the left post to put Maryland up two goals.

“You can tell when he’s on the ball, something good is always going to happen,” Sejdic said. “His second goal is something that you won’t really see from too many college players at this level.”

The duo combined to earn Williamson his hat trick in the 85th minute. Sejdic hit Williamson making a run behind the defense, and Williamson cleanly finished the one-on-one chance to Schilling’s left, giving Maryland a 5-2 lead and just enough cushion to withstand a furious Badgers comeback in the final five minutes.

The Terps hope to see more plays like that from their star midfielders as they attempt to avenge their second-round NCAA tournament loss.

“We’ve been asking Eryk to get more production,” Cirovski said, “and boy did he come through tonight.”