DURHAM, N.C. (AP) The ball - and No. 17 Duke's final chance to tie - bounced off Jayson Tatum's foot and right to North Carolina State star freshman Dennis Smith Jr.

Smith grabbed it and sprinted to the other end as the final seconds vanished for a stunning 84-82 win in the Blue Devils' famously hostile Cameron Indoor Stadium. But he didn't stop when the horn sounded - continuing his downcourt charge, taking off a few steps inside the foul line and throwing down a rim-jarring dunk.

It didn't matter that the dunk didn't count. Smith had provided the perfect capper to a spectacular performance Monday night, one that had his teammates mobbing him in celebration the moment he touched down.

''I'm not surprised at all,'' Smith said. ''A lot of people say it's an upset. But I planned on winning. I believe our team planned on winning.''

Still, that was something N.C. State (14-7, 3-5 Atlantic Coast Conference) hadn't done in Cameron since 1995. And this was the same team that had lost four of five coming in, including a 51-point loss at rival North Carolina earlier this month.

Yet N.C. State rallied from 12 down late in the first half, used a 20-5 run to erase a 68-59 deficit in the final 6 1/2 minutes, then got the final stop when Tatum lost control of the ball before getting off a shot to end it for Duke (15-5, 3-4).

It all started with Smith, the point guard and projected lottery pick as a potential one-and-done NBA prospect. Smith finished 10 for 18 from the floor and finished with six assists.

''Dennis is scary,'' Duke freshman Frank Jackson said. ''We knew that he was capable of and he did it.''

Added Duke associate head coach Jeff Capel: ''He's a very talented kid, and played lights-out basketball tonight.''

Smith was asked about whether he had dreamed of punctuating a big win like that final dunk - which came with teammate Terry Henderson following him downcourt with arms raised in celebration.

''I don't even know if the dunk counted,'' Smith said with a laugh, adding: ''I just dreamed of winning big games, regardless of where it's at.''

BIG PICTURE

N.C. State: Can anyone figure out the Wolfpack? This was a group coming off Saturday's home loss to a Wake Forest team that hadn't won a road ACC game in three years. Yet N.C. State responded with the kind of consistently determined effort it hadn't shown much this season.

''We've taken a few hits obviously,'' Wolfpack coach Mark Gottfried said. ''I think it shows a lot about character after you take a few hits to come and win a game like this here.''

Duke: The Blue Devils just couldn't corral Smith all night, and Capel - leading the team in Mike Krzyzewski's absence following back surgery - is still tinkering with lineups and rotations. He brought Luke Kennard and Grayson Allen off the bench for this one, and Duke kept threatening to make this one look like so many games before at Cameron. And yet, when Smith and the Wolfpack made their move, the Blue Devils struggled for an answer.

''We got a lead and kind of got comfortable,'' said Kennard, who led Duke with 20 points. ''We have to be a team that closes out leads when we have them.''

POST HELP

Abdul-Malik Abu had 19 points and nine rebounds for the Wolfpack, including the go-ahead dunk with 2:37 left off an alley-oop feed from Smith. More surprisingly, freshman Ted Kapita - who hadn't played the past two games - finished with 14 points on 6-for-7 shooting with 10 rebounds in 19 minutes.

''I'm still learning about our team, still trying to figure my team out, who needs to play,'' Gottfried said.

SECOND-HALF REVERSAL

N.C. State shot 55 percent after halftime, while Duke went from shooting 57 percent before halftime to 38 percent after the break. That included the Blue Devils missing 12 of 14 3-point tries in the final 20 minutes.

UP NEXT

N.C. State: N.C. State gets a few days off before visiting No. 13 Louisville on Sunday.

Duke: Duke stays in its home state, visiting Wake Forest on Saturday.

---

Follow Aaron Beard on Twitter at http://www.twitter.com/aaronbeardap

---

More AP college basketball: http://collegebasketball.ap.org and http://www.twitter.com/AP-Top25

Copyright 2017 by STATS LLC. Any commercial use or distribution without the express written consent of STATS LLC is strictly prohibited.