Trailing 69-62 with about a minute remaining against Minnesota on Thursday, the Maryland women’s basketball team needed a massive late-game run to avoid falling out of first place in the Big Ten with a second consecutive loss.

Fresh off the worst performance of her college career, guard Kaila Charles answered the bell.

The junior scored six points in the final 50 seconds, leading a stunning 9-0 run she capped by gathering a tipped Golden Gopher inbound pass, charging downcourt and scoring a layup with under a second left that gave the No. 8 Terps a miraculous 71-69 win over the Gophers.

“Really incredible, special win for us,” coach Brenda Frese said. “You always want that to play out like it did for Kaila tonight.”

Charles scored 29 points — 21 after halftime — to save Maryland from the brink of disaster and avoid a loss to a Golden Gophers squad that entered one game above .500 in Big Ten play but carried a 45-36 lead into halftime against the Terps.

A game after scoring a career-low two points in a 86-73 loss at No. 10 Iowa, Charles single-handedly brought Maryland (24-3, 13-3 Big Ten) back within reach against Minnesota (19-8, 8-8). The junior scored 13 of the team’s first 19 points after halftime to pull the Terps within seven points at the 7:09 mark of the fourth quarter.

After a pair of 3-pointers from guard Taylor Mikesell, Charles took over again, scoring six of the team’s final nine points to cap the improbable comeback.

“I was just trying to get to the rim, maybe drive and get fouled, and it went in,” Charles recounted of the final play. “That play wouldn’t have happened if Shakira didn’t tip the ball.

However, it was all Minnesota before the final quarter.

The Golden Gophers jumped out to a 15-7 start, but Maryland countered with an 8-2 run to whittle its deficit to two. Guard Destiny Pitts buried a triple to stymie the burst, and the make would prove to be a harbinger of the sophomore’s ensuing offensive outburst.

With guard Blair Watson on the bench with three fouls, the Terps had no answer on the perimeter. To complicate matters further, forward Brianna Fraser twisted her ankle after coming down on the heel of forward Taiye Bello when trying to time a rebound, and the senior didn’t return; she’s listed as day-to-day.

“We were plugging holes a lot when Bri went down,” Frese said.

As two key rotation players sat on the sidelines, Pitts continued to get open looks behind the arc and seemingly uncontested drives to the rim. The sophomore drilled another long-range shot — her fifth of the half — to give the Gophers a 43-31 lead with two minutes left to up her total to 19 points before the break.

Mikesell swished a buzzer-beating trey at the top of the key to slow the bleeding, but the Terps still trailed 45-36 at the half. Pitts and guard Kenisha Bell combined for 34 points in the opening 20 minutes. After exiting the locker room, though, the pair combined for just 13 points.

“I thought the triangle-and-two was the difference,” Frese said. “Being able to have that time [at the break] to readjust, I thought the second half we were much better with that gameplan.”

The Golden Gophers opened the second half on a 9-2 run to move in front 54-38, and Charles did all she could to will Maryland back into the contest.

Charles scored eight of Maryland’s 12 third-quarter points, and entering the final 10 minutes, the Terps trailed 59-48. Yet, the struggling home squad didn’t relinquish hope.

“I had all the faith in my team that we were going to come back,” Charles said.

A Charles midrange jumper brought Maryland within 61-52, and her teammates finally began to contribute. After a pair of threes by Mikesell, the Terps were down just five.

Following the first of two Minnesota turnovers on inbound attempts — the squad had seven of its 18 giveaways in the fourth quarter alone — Charles drove the lane and finished at the rim to draw the game even with six seconds remaining.

The tying conversion sparked a Maryland celebration and a deafening eruption from the crowd, having erased a deficit that was as large as 16 in the third quarter and seven with under a minute remaining.

“This team has really grown up,” Frese said. “You could see the confidence the players had, just chipping away with it slowly, one possession at a time.”

But Charles wasn’t finished. Frese drew up a play with forward Shakira Austin defending the inbounder, and the 6-foot-5 post player’s length allowed her to tip the inbounds pass with four seconds left, right into the hands of the Terps’ leading scorer.

Charles charged toward the hoop once more, and her finish gave Maryland its first lead of the game at the death, avoiding an upset that would’ve dropped the Terps from the Big Ten lead.

“It’s huge, especially how far down we were down coming into halftime,” Mikesell said. “It says a lot about how we fight as a team and how we trust each other.”