NEW YORK — The Terrapins women’s basketball team knew what it was up against.

Connecticut was the No. 1 team in the country. The Huskies had won the past three national titles and entered Monday night’s game on a 46-game winning streak. In last season’s Final Four, coach Geno Auriemma’s squad demolished the Terps, 81-58, to end their season.

But this time around, coach Brenda Frese’s team stayed with the Huskies. For 40 minutes, the No. 6 Terps threatened to knock off a program that had grown accustomed to blowing out its opponents.

In the end, however, the Terps couldn’t complete the upset. UConn forward Breanna Stewart, the two-time Associated Press Player of the Year, led her team with 23 points and the Terps committed 22 turnovers in a 83-73 defeat.

This result marked the Terps’ first defeat of the season and fifth in the past four seasons to UConn. But in the loss, the veteran coach saw a group capable of performing well on a national stage against the country’s premier program.

“Obviously nobody wants to lose — I mean we’re one of the most competitive teams out there — but I’m really proud of the fact that I felt like we responded punch for punch,” Frese said. “When you look at UConn in the games they’ve played in, usually that knockout punch comes, and you don’t recover. So I loved the confidence and the swagger that we played with. There was no fear.”

The Terps played without their most productive player for much of the first quarter, as guard Shatori Walker-Kimbrough, who entered the game averaging 19.2 points and 6.0 rebounds per game, picked up her second foul with her team leading 6-4 and 6:27 left in the opening frame. Guard Kiara Leslie entered, while the preseason All-Big Ten honoree sat on the bench for the rest of the period.

UConn (10-0) immediately took advantage. The three-time reigning national champs poured in back-to-back 3-pointers before adding a layup to put the Terps (11-1) in a six-point hole.

Even so, the Terps stayed within striking distance, largely due to the Huskies’ carelessness with the ball and the play of center Brionna Jones. UConn, which committed a season-high 17 turnovers against DePaul, gave the ball away nine times in the first quarter.

Jones, meanwhile, led the Terps with eight points on 4-for-4 shooting, helping the Terps stay within seven after the first 10 minutes. She finished with a game-high 24 points on 12-for-14 shooting.

Walker-Kimbrough took the court to start the second quarter, and her 3-pointer was the second basket of a 7-0 Terps’ run that knotted the contest at 21. Despite playing 13 minutes, the 5-foot-11 junior led all scorers with 11 points at the break and helped her team keep the game within four at halftime.

Auriemma said the Terps are a tough matchup because of their size inside. And when the Huskies collapsed, Auriemma said, there were shooters who made his team pay. Monday night, that responsibility fell on guard Kristen Confroy, who went 4-for-7 from deep and finished with 12 points.

“They’re much more balanced than they were last year,” Auriemma said. “I think they’re a lot harder to match up with.”

Three straight turnovers out of intermission allowed the Huskies to extend their lead to eight, but the Terps went on a 7-0 run to tie the game at 40. Moments later, forward Brionna Fraser’s three-point play with 4:35 left in the third put the Terps up 43-31.

The advantage wouldn’t last as UConn scored the next nine points, prompting Frese to call a timeout.

And facing a nine-point deficit to start the fourth quarter, the Terps didn’t have an answer this time. Though they got as close as four after forward Tierney Pfirman’s long ball late in the fourth, the Terps eventually fell short of handing UConn its first loss in more than a year.

For much of the nearly nine-minute postgame press conference, Walker-Kimbrough displayed a noticeable sense of disappointment. In between Frese and Confroy at the podium, she sat slumped with her head rested on her left hand while she gazed downward.

“We were right there,” Walker-Kimbrough said.

But in the words that followed, Walker-Kimbrough gave a more positive outlook on the result. She explained how Monday night’s game showed what the Terps are capable of achieving moving forward.

It’s a sentiment Frese had preached to her team moments earlier.

“Like I told my team in the locker room,” Frese said. “If we continue to work this hard and compete, big things are in store for this team come March.”