When Maryland women’s basketball fell behind, 8-2, less than two minutes into Sunday’s game against South Carolina, coach Brenda Frese called a timeout to try to prevent a game-deciding quarter from manifesting, like it had in the teams’ 2017 matchup.

The Terps came out of the first period last year trailing South Carolina by 16 points, leading to an eventual 94-86 home defeat. As the No. 10 Gamecocks’ advantage grew to 16-4 Sunday, the game appeared to be following a similar script.

But Maryland refused to allow history to repeat itself.

A transition layup by guard Taylor Mikesell cut into the 12-point Gamecocks lead, and, over the next 10 minutes, five different Terps combined for a 24-1 run to pull No. 9 Maryland in front, 30-19, with 6:51 left in the second quarter.

A 9-0 run to end the half completed a 31-point swing to give the Terps a 45-26 lead at the break, and Maryland held on to win 85-61 despite a second-half surge by the Gamecocks.

“South Carolina came out with the first punch,” Frese said. “But I love the fact that we just kind of settled in, and the run we were able to make in the second quarter … was more indicative of how we want to play.”

Maryland (4-0) turned it over three times in five possession to start the game, and the crowd got behind their home team as South Carolina (2-1) built a 12-2 run to begin the action. But the Gamecocks’ momentum didn’t last for long.

A 39-8 run to end the half gave the Terps a 19-point lead at the break, and guard Channise Lewis was a force in the turnaround. Her seven-point, eight-assist and zero-turnover performance in the first half settled down the rattled Terps, and their shooting followed suit.

The Terps shot 51 percent to the Gamecocks 33 percent in the first 20 minutes, and, with a 26-14 advantage on the glass, they dominated the frontcourt after the early run by South Carolina. Forward Stephanie Jones led the way scoring with 10 points on 4-of-5 in the first half, while guard Blair Watson added nine points.

One of factors in the Terps’ turnaround was their relentless work ethic on the glass. With a 53-29 rebounding edge and 22 offensive boards, their ability to secure South Carolina misses consistently limited the Gamecocks’ possessions to just one shot.

“Timing the shot, knowing the angle, what side the ball is coming off of,” forward Shakira Austin said, explaining how she collected nine of her game-high 16 rebounds on the offensive end. “And not letting someone box you out.”

Austin dominated the glass, while guard Kaila Charles was second with 10 boards. No Gamecock finished with more than six.

After a 3-pointer by Lewis on the first possession of the second half gave Maryland a 22-point advantage, South Carolina turned up their defensive intensity, exposing some of the early-season ball-handling issues the Terps exhibited during a 24-turnover performance against Dayton on Nov. 11.

“We talked about how the second half was going to be harder than the first half,” Frese said. “So I was surprise by our response to it, but at the same point it’s only the fourth game of the season.”

The Gamecocks’ full-court press led to seven Maryland turnovers, and a 13-2 run cut the Terps’ lead to just 11. But a trey from guard Blair Watson stopped the bleeding, and the Terps began to break South Carolina’s press.

Because they shot just 37.8 percent from the field in the second half, and the Gamecocks weren’t able to set up their press. Maryland allowed just 12 points in the final 13 minutes to end the game.

The Terps rebounded to outscore the Gamecocks, 25-15, in the fourth quarter, improving on their uneven 31.3 percent third-quarter shooting to make 57.1 percent of their shots when it mattered most.

While Maryland continued to be inconsistent on offense during the road top-10 triumph, defense carried it through another up-and-down offensive performance. Despite turning it over 20 times, the defense held South Carolina to just 36 percent from the field and 1-for-21 from beyond the arc.

The Terps struggled to net a statement nonconference win in recent seasons, and although they struggled at times and in certain areas against the Gamecocks, they still came away with a huge win on the road.

“To be able to come in an environment that’s this difficult, it can’t be just one player that’s going to shoulder the load,” Frese said. “We’re not a finished product, nowhere near.”