The Maryland men’s basketball team’s season had slipped into a gloomy state, capped by a dreadful showing at No. 7 Michigan that ended in a blowout loss this week. After that game, Coach Mark Turgeon showed his players 37 video clips of subpar defense, hoping they would learn and respond. The Terrapins’ chance to correct those mistakes came during a trip to Minnesota to face a ranked team that had yet to lose at home.

But Maryland controlled Saturday afternoon’s matchup with stifling defense, scoring a 63-49 victory over the No. 17 Golden Gophers. Maryland has defeated three ranked teams on the road for the first time in program history. And this win came when the Terps (9-7, 3-6 Big Ten) desperately needed a boost to keep their season from unraveling. The Terps’ résumé also includes wins at then-No. 6 Wisconsin and then-No. 12 Illinois — which, adding Saturday’s win, account for all of their conference victories.

“We’re all dogs, man,” senior guard Darryl Morsell said. “The team’s full of dogs. And we’re built for this. We love coming into other arenas and just leaving our mark.”

Maryland held Minnesota (11-5, 4-5) to a season-low 49 points. The Gophers shot 14 for 46 (30.4 percent), and Maryland never trailed. The Terps’ defense, which has struggled at times this season, played well from the first possession. Morsell said he knew his team would be dialed in based on the practices heading into the game.

Junior guard Eric Ayala led the Terrapins with 21 points on 8-for-14 shooting in his return to the starting lineup; he missed two games with a groin injury and then came off the bench in the Terps’ 87-63 loss Tuesday at Michigan. Only one other Terps player finished in double figures Saturday — sophomore forward Donta Scott with 15 points — but players across the roster offered key contributions. Junior guard Aaron Wiggins recorded eight points, 10 rebounds and four assists. Morsell led the defensive effort that was the deciding factor.

“It starts with Darryl,” Turgeon said of his team’s defense. “And I thought it started with Darryl and Donta today. Donta was very physical to start the game, and I thought Darryl was terrific. It rubs off on everybody else.”

Morsell was tasked with guarding Minnesota star Marcus Carr, who scored 25 points on 8-for-14 shooting but didn’t get any help. Outside of the junior guard from Toronto, the Gophers made just six field goals. The Terps’ offense slowed in the second half, but Minnesota never got closer than six points. With Maryland ahead by double digits late in the second half, Morsell implored his teammates to hold the Gophers to fewer than 50 points.

“And I’m thinking: ‘Man, this guy is crazy. Not Minnesota. They’re going to get over 50,’ ” Turgeon said. “And they did it. Guys were locked in.”

The Terrapins’ defense stymied Minnesota from the start. The Golden Gophers missed seven of their first eight shots while committing four turnovers, and Maryland capitalized by jumping to a 17-3 lead. But just after the Terps created that significant cushion, they committed turnovers on six of their next seven possessions, allowing Minnesota to cut its deficit to 20-17. After Minnesota’s run, Turgeon called a timeout, and the Terps responded with a quick 6-0 burst on baskets by Ayala and Wiggins.

Minnesota’s offense didn’t improve as the game progressed, allowing the Terps to remain a comfortable distance ahead of the Gophers en route to a resounding victory.

“In situations where we know we need a win, it’s a little different sense of urgency with the guys,” Ayala said. “We just want to play like that every day.”

Minnesota starting center Liam Robbins committed his fourth foul early in the second half, with three of those coming during a stretch of just over two minutes after halftime. The Terps have struggled with post defense, but with Robbins on the bench for much of the second half, the Gophers couldn’t exploit that weakness. Robbins, his team’s second-leading scorer at 13.8 points, fouled out with about five minutes to go and finished with six points.

Maryland started with a four-guard lineup. Scott, at 6-foot-7, was the only forward in the lineup. Senior Galin Smith, a 6-9 forward and usual starter, logged only 12 minutes off the bench as he ran into foul trouble, forcing the Terps to rely on a small lineup for much of the game. With that group — all capable shooters from three-point range — Maryland can take advantage of mismatches on the perimeter. Junior forward Jairus Hamilton, who is 6-8, hit a pair of three-pointers, including one in the second half that ended a field goal drought of nearly five minutes. Despite Minnesota’s size advantage, the Terps still outrebounded the Gophers 38-30.

The Terps endured cold spells in the second half, and the Gophers cut Maryland’s lead to half a dozen. But the Terps reestablished their double-digit advantage soon after and relied on their defense, which didn’t go through any rough patches. Maryland has been plagued by inconsistency this season, but the Terps now have three emphatic road wins, each offering a recipe for how they can get it done.

“I wish we could bottle it up and play that way every time, but we haven’t been able to do that yet,” Turgeon said. “But the common denominator is defense.”