Trimble's shot on the catch off a feed from Derek Dixon swished cleanly through the net with apparently no time left, sending the Tar Heels rushing onto the court to celebrate followed closely by the fans at a frantic, ear-ringing roar. But a review determined there was still 0.4 seconds left, prompting the Smith Center's public-address announcer to repeatedly tell fans to clear the court.
Once they did, Duke had a final chance, but Isaiah Evans couldn't get a clean handle on the long inbound pass to near halfcourt to get off a tying shot to end it - prompting another court-storming that stuck this time.
It capped a night in which UNC trailed by 13 in the second half and never led until Trimble's final shot.
Caleb Wilson scored 23 points to lead the Tar Heels (19-4, 7-3 Atlantic Coast Conference), while big man Henri Veesaar had all 13 of his points after halftime - including a tying 3-pointer with 1:40 left. Trimble had 16 points.
Cameron Boozer had 24 points and 11 rebounds to lead the Blue Devils (21-2, 10-1), but missed a drive against Veesaar in the final 20 seconds of a tie game to set up Trimble's winner.
Trimble's shot ended Duke's 10-game winning streak. It also gave the rivalry another memorable buzzer-beater on par with Austin Rivers' winning 3 here in 2012.
Franklin Street Celebration
Franklin Street was the place to be after the final buzzer tonight.
Chopper 11 was overhead as UNC fans stormed downtown, celebrating and gathering at the intersection of Franklin and Columbia streets.
Celebrations on Franklin St. after UNC beats Duke
Students just couldn't believe the Tar Heels took down their biggest rival.
"I feel great. We were the underdogs, but we came back. I didn't believe in us. But now I believe," said UNC junior Jasmine Tague.
"Insane, insane. I've never seen this before. I'm glad, I'm glad. I'm proud, I'm proud. We got the dub. Go Tar Heels!" said UNC student Milton Jones.
Chapel Hill police and public works immediately were in place here.
Blocking streets and making sure no one got hurt.