With the window open to put the Devils away, Cam Johnson made a 3-pointer on UNC's next trip and Berry made a pair of free throws with 2:29 left to push UNC's margin back to 79-71.
With the ACC regular-season all but out of reach and both teams out of sorts, there wasn't as much anticipation for this game as usual.
But that didn't matter on Thursday at the Smith Center. It never does when these teams get together.
The Blue Devils opened up by going inside and playing loose. They looked like a different team than the one that was upset by St. John's last Saturday.
With reserve forward Marques Bolden scoring inside and Trent knocking down outside shots, the Devils led by as many as 12 in the first half. A 3-pointer by Wendell Carter at 6:30 gave them a 40-28 advantage.
But UNC kept it close. Johnson, who scored 32 points in last week's loss at Clemson, had 13 points in the first half and Williams added 12.
Williams made four of his first five 3-pointers and UNC finished the half 7 of 16 from behind the line.
Duke never could exploit its advantage inside in the second half with Marvin Bagley scoring 15 points and Carter being held to 10.
UNC, meanwhile, showed the Blue Devils they could beat them at their own game.
(c)2018 The News & Observer (Raleigh, N.C.)
Visit The News & Observer (Raleigh, N.C.) at www.newsobserver.com
Distributed by Tribune Content Agency, LLC.