DURHAM, N.C. — On Aug. 24, Maryland men’s soccer suffered a 2-0 defeat in its season opener at Washington. It was the first of a four-game scoreless streak to begin the campaign, the longest in coach Sasho Cirovski’s tenure.

Midway through the first half against Duke on Saturday — three months later to the day — forward Paul Bin took a sharp touch toward the right corner to create separation from his defender. He crossed into the box toward midfielder William James Herve, who contorted his body in the middle of the air, unleashing a scissor kick to generate the Terps’ 25th goal of the season.

Maryland’s 17-year NCAA tournament streak seemed to be in jeopardy after its early-season dry spell led to an 0-2-2 start. But the No. 11-seed Terps have now scored in nine straight games, and with the 2-0 win over the No. 6-seed Blue Devils in the third round, they’ll advance to the national quarterfinals for the first time since 2015.

“This was an outstanding performance against a great team on the road in a big game,” Cirovski said. “We did all the things you need to do to win a big game like this.”

Throughout the offensive ups and downs this season, Maryland’s defense guided the team until the scoring stabilized. That was the case again Saturday, as two momentum-halting goals from the Terps diminished Duke’s chances after absorbing stretches of forceful pressure.

Through the first 23 minutes of play, the Terps had just one shot, which was blocked just inside the 18-yard box. Meanwhile, the Blue Devils had numerous good looks early on, including a try from forward Daniel Wright in the fifth minute that bounced off goalkeeper Dayne St. Clair’s chest and back onto a soggy, slippery field that absorbed hours of rain throughout the day.

Maryland’s offense converted on its second attempt of the night, as Herve found the net for the first time since Sept. 30. The freshman said the acrobatic shot was his best of his young college career.

“I tried it a long time ago and I didn’t score it. I didn’t try it again for a long time, but I just felt it,” Herve said. “Paul did an incredible job beating that guy, made an incredible serve and I just felt it.”

The goal not only put the Terps up 1-0 on the road, but also briefly stopped the pressure from the Blue Devils, who had lost only three times at Koskinen Stadium this season.

For a Maryland squad that had lost only once this season when scoring first, that made the task even easier.

“The timing of the goal was super important,” defender Chase Gasper said. “It was a critical moment of the the first half when they were really starting to establishing a rhythm and possession.”

Maryland couldn’t score for the rest of the opening period after Duke midfielder Brandon Williamson denied Amar Sejdic with a goal-line clearance in the 33rd minute, which could’ve given the Terps a two-goal lead before the break.

In the second half, after 15 minutes of relentless Duke pressure, Maryland’s own pressure for its attackers provided another opportunity for Sejdic, who wouldn’t be denied twice.

Similar to the second round — when he intercepted an errant pass from NC State’s goalkeeper before scoring an easy goal — Sejdic accepted a gift from Duke midfielder Jack Doran, who played a ball into no man’s land in the 60th minute. The senior ran onto the ball and gave Maryland a 2-0 lead with his first touch.

“We defended relentlessly. We blocked shots. We pressured the ball. We double-teamed,” Cirovski said. “We got a great second goal off of our pressure, similar to last week.”

More than a year since Maryland conceded three goals in a game, the result was all but sealed after Sejdic’s team-leading seventh goal of the season.

The Terps couldn’t dominate the Blue Devils the way they did the Wolfpack, but Duke’s 16-8 final shot advantage hardly mattered. A Maryland team that began the year with zero scores in four games found the net with two of its first four shots on goal, putting it a game away from the College Cup.

“I couldn’t be more proud of how far this team has come from the beginning,” Cirovski said. “We just keep getting better and there’s a belief in this team right now that they’re almost invincible.