Six games was a long time to be away from home — by far the longest stretch the Gophers played away from Williams Arena in Richard Pitino’s six seasons as coach.

Being able to feed off an energetic crowd and a career-high 32 points from Amir Coffey was enough to help the Gophers come back from a 13-point deficit and get their first Big Ten men’s basketball victory this season by beating No. 24 Nebraska 85-78 on Wednesday night at the Barn.

The Gophers (7-2, 1-1 Big Ten), who lost 79-59 at No. 16 Ohio State on Sunday night to open league play, bounced back with inspired play for senior guard Dupree McBrayer, who lost his mother to a battle with cancer Monday.

“The team is going through a tough time with the loss of Dupree’s mom,” Coffey said. “That was in the back of our mind the whole game. We just wanted to be there for him tonight, and he told us, ‘Let’s go get this W.’ ”

The Cornhuskers (7-2, 1-1), who were held to 38 percent shooting in the second half, scored 19 points on 13 Minnesota turnovers to stay in control until the momentum swung heavily in the home team’s favor. Minnesota shot 57 percent in the second half and ended the game on a 29-11 run in the last 10 minutes, 20 seconds.

Coffey tried to single-handedly carry a team playing with heavy hearts, as players wore patches with the initials of Tayra McFarlane, McBrayer’s mother. The 6-8 junior nailed a three-pointer for his 30th point that capped a 9-0 second-half run and gave Minnesota a 77-73 lead with 2:25 remaining.

A couple of minutes earlier, McBrayer hit a three on an assist from Coffey that ignited the crowd and cut Nebraska’s lead to 71-68. The New York native and co-captain fouled out with 1:17 to play, with the crowd giving him supportive applause as he went to the bench.

After the game, McBrayer’s eyes teared up as he was embraced by his teammates — and even Nebraska coach Tim Miles. Pitino was proud of the way McBrayer played through the pain of his tragic loss, compiling five points and four assists in 34 minutes.

“I just wanted so badly for the ball to go in for him,” said a choked-up Pitino. “Just so he could feel good about himself just for a minute.”

VideoVideo (06:05): Gophers coach Richard Pitino, Amir Coffey, Jordan Murphy and Nebraska coach Tim Miles talk after Wednesday's game at the Barn

Coffey shot 8-for-16 from the field and 14-for-17 from the foul line, to go with six assists and six rebounds. Jordan Murphy finished with 18 point and 13 rebounds, which gave him a school-record 52nd career double-double.

In the first half, Coffey sparked a 13-2 run to give Minnesota a 36-32 lead with just under five minutes remaining, but the momentum evaporated when Coffey left the game after he picked up his third foul.

The Cornhuskers, who led 44-39 at halftime, took a 55-42 lead early in the second half on free throws from Glynn Watson Jr. after McBrayer picked up his third foul.

After Pitino called out his team’s lack of physical toughness against Ohio State, the Gophers responded to the challenge on a night when they were playing for more than only a Big Ten victory.

“We didn’t hang our heads knowing we were down 13,” Murphy said. “We just had to keep fighting, keep rebounding, keep scrapping and keep defending. That was one of the biggest things.”