Kimani Stewart-Baynes found space on the left flank. He received a pass with space to run towards goal.

Instead of dribbling to the endline, the forward cut back onto his right foot and lofted a cross toward the back post. The ball evaded every Villanova defender in the box, but not Stewart-Baynes’ fellow freshman Luke van Heukelum, who headed home Maryland men’s soccer’s fifth goal of the match.

The Terps put on a rare attacking display at Ludwig Field on Tuesday. Maryland scored more than two goals for the first time this year in its 6-4 win over Villanova.

The Terps registered six goals for the first time since last year’s 6-1 win against Virginia. Amid offensive struggles, Maryland will hope to take confidence from Tuesday night’s showing in front of the net before it re-enters Big Ten play on Sunday.

“Beautiful cross, couldn’t have been placed any better,” said van Heukelum of his decisive goal, the Terps’ fifth against Villanova. “We’ve been looking for that a lot throughout the season, and finally the plays are starting to click.”

Maryland struck first, and early. Villanova’s defense attempted to play out of the back and failed to clear the ball. Van Heukelum controlled the ball in the box and quickly passed to Stewart-Baynes.

Stewart-Baynes took one touch before slotting a low shot past Villanova goalie Kent Dickey. The forward’s second goal of the season gave Maryland a lead that wouldn’t last long.

“I just had to control it, see if I could find a little opening to shoot it,” Stewart-Baynes said. “Luckily it went in.”

[Stefan Copetti, Jamie Lowell shined on Maryland men’s soccer’s senior night]

Wildcats defender Anthony Cousins Jr. lashed a one-time shot low on frame, forcing a save from Maryland goalie Jamie Lowell. He could only parry the ball back into the box toward Vincent Petrera, who tapped in a shot right in front of goal in the 16th minute to cancel Stewart-Baynes’ opener.

Stefan Copetti added his name to the scoresheet next for the Terps, who took the lead on three separate occasions in the first half.

Riley placed a shot from inside the penalty box toward goal and forced a save out of Dickey. The Wildcats goalie saved Riley’s shot with one hand, spilling the ball in front of goal. Copetti rolled a shot into an empty net for Maryland’s second goal of the night.

Maryland earned five corners in the first 45 minutes of play. Bjarne Thiesen took advantage of one. Leon Koehl whipped in an inswinging corner into the box in the 34th minute. Thiesen jumped highest, glancing a header for his first ever goal as a Terp.

But Villanova made the most of their chances, equalizing three different times in the first half.

“Strictly today, it was not great defensively,” coach Sasho Cirovski said.

The Wildcats’ second goal came courtesy of Branden Johns in the 26th minute. Balthi Saunders dribbled the ball into the box. Mikah Seger, who replaced starter Jamie Lowell after he suffered an injury early, rushed off his line. Saunders passed to Johns, who scored into the vacated net.

[Stefan Copetti’s strike helps Maryland men’s soccer beat Bowling Green, 1-0]

Then it was Gray Ricca.

Ricca combined with Petrera, playing a quick one-two pass inside the area. Ricca shot first time with the outside of the foot, bending a shot into the top corner of the net to tie the score again in the 36th minute.

The Terps dominated the first half inside the attacking third, racking up 14 shots, but surrendered their advantage three times to enter the break tied at 3-3.

Copetti added his second of the match early in the second half before Van Heukelum calmly headed home Maryland’s fifth goal of the game. His finish gave the Terps their first two-goal advantage of the match, one they wouldn’t surrender despite late game fireworks.

“We won the second half, 3-1, so we can’t complain about that,” Cirovski said.

Villanova scored a fourth through Johns, his second of the match. Johns dribbled into the box and put his laces through the ball. His shot arrowed into the top corner, cutting the Wildcats’ deficit to one goal in the 74th minute.

Maryland prevented another Villanova equalizer with a late goal of their own. Stewart-Baynes scored his second goal of the game on a breakaway in the 89th minute, capping off a six-goal display for the Terps in a two-goal win.

“It was a crazy Tuesday night,” Cirovski said. “Our attack looked fantastic … obviously, not too happy with conceding four goals.”