You couldn’t tell from the frustrated look on coach Richard Pitino’s face walking off at halftime, but his team was ahead by 10.

As sloppy as the offensive execution looked, it was made worse with 14 missed free throws. But the Gophers leaned on their defense and finally made enough foul shots late to pull out a hard-fought 69-64 victory Sunday.

“I was really proud of our guys being able to weather the storm,” Pitino said. “We had a big lead. They came back. They were very, very physical and turned us over, but we found a way to make winning plays. Sometimes when you’re having a night where you’re not flowing offensively, you’ve got to do that.”

Amir Coffey hit five free throws in the last 89 seconds for the Gophers (3-0), who wore new black uniforms for the game and used a 14-0 run to take a 21-7 lead early on. Coffey finished with 12 points but had six turnovers. Jordan Murphy scored a team-high 14 points, to go with seven rebounds.

Brandon Mahan had a career-high 17 points for the Aggies (1-3), and Christian Mekowulu added 16. Texas A&M played without senior guard Admon Gilder (hamstring, knee) for the fourth game in a row.

The Aggies (1-3) weren’t supposed to be Minnesota’s toughest opponent in British Columbia. That bigger challenge appeared to be coming Wednesday against Pac-12 title contender Washington.

But Mahan’s dunk off the 20th Gophers turnover tied the score, and his follow-up three-pointer gave A&M its first lead at 60-57 with just under five minutes to play.

Pitino’s father, Rick, was among the fans trying to motivate the Gophers as they were outscored 24-9 during a stretch when the Aggies turned the tables on Minnesota defensively with a zone. In a victory over Utah last Monday, Gabe Kalscheur’s outside shooting was the answer.

With the Aggies up 64-63, Kalscheur had a three-pointer fall short with under two minutes left, but Jordan Murphy was fouled on the offensive rebound. He made one of two free throws to tie the score at 64-64.

And as it turned out, the Aggies never scored again. The Gophers forced a turnover and Coffey was fouled hard driving to the basket, making both free throws for a 66-64 lead with 1:29 to go. A&M missed two shots at the other end and Coffey went to the line again, making one of two free throws.

Kalscheur came up with a steal on the Aggies’ next possession and drove to the basket. His shot was blocked, but Coffey secured the rebound, was fouled and hit two free throws for the final points with 30.4 seconds to go.

The Gophers had eight players score in the first half, when they shot 50 percent from the floor and 5-for-12 from three-point range. But they just couldn’t pull away. Whether from an errant pass, mishandled loose ball or rebound, it was never pretty on both ends.

Pitino switched his defenses, though, trying to keep A&M from finding any rhythm. Minnesota used man-to-man, zone and even a three-quarter-court press to disrupt its Southeastern Conference foe. Both teams combined for 26 turnovers in the first half.

“They were physical,” said Pitino, whose team has a day off in Vancouver before Tuesday’s game vs. Santa Clara. “We hadn’t seen a defense like that. It’s early and we had young guys out there.”