In the 90th minute of the Maryland men's soccer home opener on Friday, No. 10 Stanford created a threatening counterattack in an attempt to steal a game the Terps dominated in possession.

A blocked shot and a frantic clearance inside the box preceded goalkeeper Dayne St. Clair's only save of the game. The Maryland defense staved off what would've been a heartbreaking finish, and the Terps held on for a scoreless draw against the defending national champions in double overtime.

It was more of the same Monday against No. 7 Virginia at Audi Field in Washington, D.C. Maryland salvaged another draw without finding the net, although this time the Terps' defense went untroubled for the majority of the contest.

St. Clair faced one shot for the second straight match, when a errant cross into the box mistakenly wound up safely in his arms. Maryland's defense appeared stout once more against an annual NCAA tournament challenger.

"As long as the ball doesn't go in the back of the net," St. Clair said, "we did our job in the back."

At this time last year, Maryland had a far different outlook. The offense was expected to carry the team, while the future of the defense remained uncertain.

When Maryland traveled to Santa Clara for the 2017 season opener, the defense hadn't yet come together.

St. Clair was a first-time starter. Johannes Bergmann and UCLA transfer Chase Gasper were first-year Terps. Then-senior George Campbell was transitioning from midfield to right back. Miles Stray, who transferred this offseason, completed an inexperienced backline.

That group — which soon substituted Stray for eventual second-team All-Big Ten recipient Donovan Pines — conceded a goal less than three minutes into the season against a Broncos team that finished with three wins.

By the end of the year, Maryland's highly regarded attack became its downfall, as the team scored two goals in its final six matches. Meanwhile, the Terps' defense developed into one of the most solid units in the nation.

"Everybody on the team knew it. All of the defenders knew it," Gasper recalled. "It was just a matter of time before we showed the country that our defense was legit."

Just three games into the 2018 campaign, defense is the only thing keeping the Terps from a disastrous start. Maryland hasn't scored in 310 minutes, and had it not been for two clean sheets, the Terps would be 0-3 for the first time since 1992.

Since allowing two first-half goals on Aug. 24 against then-No. 24 Washington, St. Clair has barely been tested. The Huskies put seven shots on goal in the first 45 minutes of Maryland's season; Stanford and Virginia combined for two in 220 total minutes.

"It's team defending," coach Sasho Cirovski said. "Obviously we have a very good backline and good goalkeeper, but I thought we showed great commitment and defending as a group. That's been a strength of ours right now, for sure."

The Terps started two midfielders in their loss to Washington and were overrun. Since then, Cirovski has dropped Andrew Samuels into a holding midfield role and withdrawn forward Eric Matzelevich to improve the Terps' midfield presence, aiding the team's back four.

Virginia coach George Gelnovatch understands Maryland's defensive dependency. Despite producing only one goal in their first two games, the Cavaliers are undefeated thanks to two clean sheets.

"It's easier to have a mentality of not conceding this time of year when your offense isn't clicking," Gelnovatch said. "[Maryland's] a good team and they're going to score goals. In the meanwhile, you make sure you don't concede and make sure you don't lose games that way."

So far, that's what Maryland has done. The Terps have proven their defensive stability, posting back-to-back shutouts against two top-10 teams.

But until its offense can display any semblance of the sporadic lethality it had last year, Maryland will continue to rely on strong defensive efforts like Monday's to prevent losses.

"For the team to hold out a shutout again … that speaks to the character of this team, the hard work, the ability of the entire group defending," Gasper said. "I'm extremely proud of the team and just looking forward for this next game against UCLA."