COLLEGE PARK, Md. (AP) Top-ranked UConn had just let a 19-point lead dwindle to five, causing the sellout crowd at Maryland to crank the noise to a deafening volume.

Perhaps another team would have wilted. Not the Huskies, who know a thing or two about winning under any circumstance.

An ailing Katie Lou Samuelson scored 17 of her 23 points in the second half, and Connecticut held off No. 4 Maryland 87-81 on Thursday night for its 87th consecutive victory.

Kia Nurse contributed 19 points and Gabby Williams fought through foul trouble to add 16 for the Huskies (12-0), who tied an NCAA women's record with their 30th consecutive road win.

UConn stands three victories short of its own NCAA mark of 90 successive wins.

After taking a 36-31 lead at halftime, Connecticut opened the second half with a 14-0 run to seemingly take control. Nurse started and ended the spree with 3-pointers, and Samuelson chipped in with a four-point play.

The Terrapins (12-1) closed to 75-70 with 3:40 left before a layup by Napheesa Collier blunted the comeback. Then, after Maryland got within six, Saniya Chong drilled a jumper from beyond the arc to make it 84-75 with 48 seconds remaining.

"Everything that happened except us getting up 19, I expected it to happen," Huskies coach Geno Auriemma said. "Maybe we won this game because, in some way, it's Connecticut and we're used to making some of the plays we made tonight.

"When we needed a shot, we got one. When we needed a stop, we got one. When we needed a play, we got one. It came from different spots, and we needed every one of them."

Five different Huskies scored after the Terps got within five points, and five players finished in double figures.

Samuelson was so ill before the game, Auriemma said he wouldn't have been surprised if she didn't play. Not only did the 6-foot-3 sophomore start, but she logged 29 minutes and drilled four shots from beyond the arc.

"There was no way I wasn't playing," Samuelson said afterward.

Brionna Jones had 19 points and 13 rebounds for the Terrapins. Destiny Slocum scored 23 and Kaila Charles had 18.

The matchup between unbeaten teams drew a crowd of 17,950, the first sellout at a Maryland women's home game since 2007 and more than the announced attendance of the Terrapins previous six home games combined.

It was the sixth game between the teams over the past four years, and UConn has won every one of them. This one was the closest of them all.

"I think we've closed the gap," Jones said.

Terps coach Brenda Friese added: "We're not afraid of the name on the jersey, and that's three-quarters of the battle. You've got to have confidence."

Nurse and Williams each scored 10 points, and the Huskies forced 10 turnovers in taking a 36-31 halftime lead.

LOVE THE CROWD

The crowd was the biggest ever for a Big Ten team at home.

"Unfortunately, these games are few and far between in women's basketball," Auriemma said. "But it was a fabulous environment. The crowd was great."

BIG PICTURE

Connecticut: The Huskies did nothing to tarnish their stature as the best women's basketball team in the country. Playing on the road against the Big Ten favorites, UConn frustrated the Terrapins with their skill, poise and depth. ... UConn tied its own road record that the team which won 90 straight games set from 2008-11. Notre Dame later matched it.

Maryland: The Terrapins put up a decent fight against a team that hasn't lost since 2014. Though Maryland remains winless against the Huskies, its performance in this one showed that the gap between the two programs isn't cavernous.

UP NEXT

Connecticut: The Huskies seek to run their road winning streak against non-ranked foes to 100 on New Year's Day at Central Florida.

Maryland: The Terps open Big Ten play on New Year's night at Minnesota.