CHAPEL HILL, N.C.—There is no such thing as a safe halftime lead for Duke.

Despite taking a 31-point advantage into the locker room, the No. 5 Blue Devils had to withstand a second-half run from No. 11 North Carolina in an 84-63 victory Sunday at Carmichael Arena. After dominating the first 20 minutes, the Blue Devils had the chance to match or surpass last year’s 40-point rout of the Tar Heels at Cameron Indoor Stadium.

Instead, the second half exemplified the issues that have plagued Duke in the second half of games against quality opponents all season—turnovers, missed free throws and lapses on the defensive end allowed North Carolina to trim the deficit to 18 and re-energize its raucous home crowd.

“Obviously it was a terrific first half for us. The second half was pretty good, but not great,” Duke head coach Joanne P. McCallie said. “We’re getting there. If you look at some of the stats there is still much work to be done. But it is exciting to play well, have fun and get better along the way. It’s a long season, and we have a lot to do from now going forward.”

With the win, the Blue Devils not only notched their 37th win all-time against North Carolina, but also denied Tar Heel head coach Sylvia Hatchell her 900th career victory.

The Blue Devils (20-1, 10-0 in the ACC) fired on all cylinders in the first half, jumping out to 34-7 lead in the game’s first 12 minutes. The team seemed as though it could not miss from beyond the arc, knocking down 7-of-9 attempts in the first half. Junior guard Chloe Wells, who led the team with a career-high 18 points on the afternoon, converted on 6-of-7 3-point attempts.

Duke’s stifling defense held North Carolina to just 21.9 percent shooting in the first half, forcing 14 turnovers. The Tar Heels (20-3, 8-2) were unable to find any semblance of offensive rhythm in the game’s opening 20 minutes.

But the second half told another story. The Blue Devils went to a zone defense in the early stages of the second half and North Carolina responded by taking advantage of Duke’s defensive miscues, capitalizing on miscommunications for easy lay-ins and finding holes in the zone for open 3-point attempts.

“We’re just trying to mix it up and as you saw we got in all this funny foul trouble,” McCallie said. “That never helps the situation. So we tried to work on a couple things and mix it up, and some good things happen and some of them are not-so-good things.”

The Tar Heels came storming back, trimming the Blue Devil lead to 18 following a 21-6 run and bringing the home crowd to its feet. After battling foul trouble in the first half, freshman forward Xylina McDaniel came alive in the second period, scoring all 12 of her points after halftime, eight of which came during the North Carolina run.

“The second half, it was just like ‘Hey, we’re down by 30. What do we have to lose? Let’s just go out there and give it all we’ve got and just play,’” Hatchell said.

It was Duke’s 3-point shooting that silenced the run. Sophomore forward Tricia Liston knocked down a triple to stop the Tar Heel onslaught and Wells added her fifth 3-pointer of the game to push the Blue Devils’ advantage back to 22 points with 8:09 to play, effectively putting the game out of reach.

North Carolina’s Tierra Ruffin-Pratt attempted to trim Duke’s deficit in the game’s closing minutes, scoring half of her 18 points in the game’s final 5:55. But it was another statistic—Ruffin-Pratt’s 11 turnovers on the afternoon—that defined the performance of the Tar Heels’ leading scorer.

Although Duke’s play in the second half still left much room for improvement, McCallie said she viewed Sunday’s game as a positive step for her team. Despite the Blue Devils’ second-half slip-ups, the team was able to recover for, what was ultimately, a 21-point win against the 11th ranked team in the nation.

“I think again our focus was excellent. Even when they got their run, we had poise and we were calm,” Wells said. “We didn’t get rattled. We went and looked at what we were doing in the first half, and we went back to that.”