Maryland men’s basketball’s triumphs against premier college basketball programs — ones like the Terps’ 79-65 win over Butler on Wednesday night — often came down to former guard Melo Trimble’s late heroics over the past three years.

But with Maryland’s three-time leading scorer pursuing the NBA, Anthony Cowan — a feisty guard who played in Trimble’s shadows last season — took full control.

While Cowan proved he could run the Terps’ offense in blowout victories against Stony Brook and Maryland Eastern Shore, he hadn’t taken over against an opponent like the Bulldogs, who have been to the NCAA tournament each of the past three years.

Cowan recorded a career-high 25 points, 10 rebounds and five assists, leading Maryland to a victory that will stick out on its NCAA tournament resume.

“He’s a big time player,” said guard Darryl Morsell, who also played AAU with Cowan. “He’s always made big time shots. He always shines under the big lights.”

While Cowan helped Maryland (3-0) pull away, center Michal Cekovsky and forward Bruno Fernando propelled the Terps to a 42-35 halftime lead.

Coach Mark Turgeon has emphasized Fernando’s upside the past three weeks as he returned to basketball shape after nursing a high ankle sprain. The freshman flashed his athleticism Wednesday with alley-oop dunks and spinning layups, finishing with eight first-half points.

In addition to Cowan, Morsell (13) and guard Dion Wiley (11), who started for the first time since 2014, scored in double figures.

“Anthony’s getting a great feel for spacing,” Turgeon said. “We got so many guys who can make jump shots. We’re hard to guard. We can really space the floor.”

Turgeon said the Terps would solve the physicality and rebounding issues that derailed last season’s squad after adding three physical players and seeing last year’s stellar freshman class bulk up. Maryland outrebounded the Bulldogs, 40-27.

Still, the Terps committed 20 turnovers, keeping Butler (2-1) in the game.

Cowan scored nine points in the first half, but his most crucial contributions came out of the intermission. The Bowie native attacked the basket at will, drawing fouls and opening opportunities on the permentier.

With 15:45 remaining, Cowan connected with Morsell for an alley-oop dunk. On the next possession, Cowan finished an and-one layup, sending the 16,317 Xfinity Center fans into a frenzy as Butler called timeout.

Guard Kevin Huerter and forward Justin Jackson — Maryland’s other star sophomores — battled foul trouble, so the Terps relied on Cowan down the stretch.

After Butler cut Maryland’s lead to five, Wiley tripped on a drive to the hoop and kicked the ball out to Cowan with seven seconds left on the shot clock. Cowan, who missed all five of his treys entering Wednesday, drained a deep 3-pointer from the left wing with 6:18 remaining — a sign of his revamped confidence.

Turgeon called it the shot of the game.

“I saw the time was going down slowly,” Cowan said. “Butler did a really good job compacting the lanes, and I thought I was far enough. So why not shoot it?”

As the Bulldogs tried to chip into Maryland’s lead, Cowan hit eight free throws and broke Butler’s full court press, displaying the same level of poise Trimble offered the past three years.

Maryland’s next nonconference challenge comes at Syracuse on Nov. 27 before Big Ten play begins later that week. With one marquee victory down, the Terps know at least one player they can lean on down the stretch in Trimble’s absence.

“[Cowan] does a really good job at playing with pace,” Butler coach LaVall Lordan said. “He seeks contact and gets to the foul line — he does a great job of that. Melo Trimble taught him that.”