DURHAM — University of North Carolina men’s soccer coach Carlos Somoano said his team gave its best effort. The University of New Hampshire just outplayed the Tar Heels on Sunday at Wildcat Stadium, he said.

UNH did all its scoring in the first half in its 4-1 triumph over North Carolina in the second round of the NCAA tournament on Sunday in front of 3,264 fans.

The 16th-seeded Wildcats (17-1-2) will face the winner of Sunday’s late second-round game between top-seeded Oregon State and St. John’s of New York in the Round of 16.

UNH’s only other Round of 16 appearance — a 2-1 loss to Indiana — came in 2017.

The Tar Heels (11-7-2) went to the College Cup (college soccer’s Final Four) last year, have made 28 tournament appearances and won the national title in 2001 and 2011.

“Having to pull guys off the field for celebrating on the bench, that’s a good problem to have,” UNH coach Marc Hubbard said. “To be able to do it against a quality opponent like that here in Durham when it’s been so hard to get teams like that to come up and play us in the regular season, it’s important to be able to send a message to everyone else that we’ve kind of arrived and we’re in a place to still accomplish all of our goals.”

UNH back Bridger Hansen opened the game’s scoring in dramatic fashion in the 23rd minute. The graduate student scored his first career bicycle-kick goal from inside the penalty box after tracking down the ball that was deflected high in the air.

North Carolina midfielder Tim Schels knotted the game at 1-1 one minute later with his goal from the top of the penalty box.

Schels’ equalizer did not phase the Wildcats.

UNH scored the game’s final three goals over the last nine minutes of the first half.

Wildcats junior midfielder Rory O’Driscoll notched the game-winning goal on a header off an assist from Tola Showunmi in the 37th minute. UNH captain and Exeter resident Jacob Gould scored via an assist from Concord’s Chris Pinkham in the 40th minute to build a 3-1 Wildcats lead. Wildcats midfielder Johann von Knebel capped the game’s scoring with his breakaway goal that came with six seconds left in the first half.

Pinkham, a senior, also assisted on Hansen’s goal.

The Wildcats’ scoring barrage came exactly one week after their 1-0 home loss to Vermont in the America East Conference championship game in which they recorded two shots on goal and one corner-kick opportunity.

“I think we realized after the Vermont showing that we came out a little dull on offense,” Gould said. “Leading up to the (North Carolina) game, preparation and stuff, that was big but really it was a mindset thing — the belief in yourself and the confidence to go forward with passion and really go at the net and attack rather than assume that the game is going to come to us.”

Somoano said von Knebel’s tally just before halftime was difficult to come back from.

“Had we gone into halftime at 3-1, I still felt like there was a shot but that one probably was a dagger,” Somoano said.

The Tar Heels had two free-kick chances over the first 13 minutes of the second half and drew a corner kick but never sent anything overly challenging at UNH junior goalkeeper Jassem Koleilat (two saves) in the second half.

North Carolina goalie Alec Smir made three saves.

Both teams had three corner-kick opportunities.

“There’s a lot of teams, a lot of players across the country right now that aren’t playing soccer and we’re fortunate to be able to do that and spend Thanksgiving together this year,” Gould said.