RALEIGH, N.C. — Duke faced another deep deficit and was staring at yet another road loss, but these Blue Devils had an even bigger problem: They weren't following the instructions of their Hall of Fame coach.

So during some late breaks, Mike Krzyzewski turned control of the huddle over to the players, and that strategy led to his latest milestone victory.

DeMarcus Nelson capped a remarkable late rally by making two free throws with 1:01 remaining to lift No. 7 Duke past North Carolina State 87-86 on Saturday and give Coach K his 800th career win.

"He kind of let us decide what we were going to do with the game," guard Jon Scheyer said, "because for a lot of it, we weren't doing the things that (the coaches) told us to do."

Nelson and Scheyer both scored 19 points for the Blue Devils (25-3, 12-2 Atlantic Coast Conference), who used a game-closing 14-5 run to take their only lead of the half, win their third straight and snap a two-game losing streak away from Cameron Indoor Stadium.

"For a couple of late timeouts, I let anyone who would actually want to talk — and say something that somebody would listen to — run the huddle," Krzyzewski said. "Teams become really good when they talk to each other. What happens is, they take ownership. We never took ownership of this game until late in the second half."

Ben McCauley scored 19 points for N.C. State (15-14, 4-11), and he made one of two free throws with 1:11 remaining to put the Wolfpack up 86-85. He fouled Nelson 10 seconds later, and the Duke captain — a 45 percent free throw shooter in his previous six games — knocked down both.

"If I would have made that, we're in overtime right now," McCauley said.

Instead, he turned it over on N.C. State's next possession with 40 seconds remaining, and Duke ran down the clock, with Scheyer missing a 3-pointer with 4 seconds left. Courtney Fells got the rebound and pushed the ball to McCauley, whose 3 from about 30 feet bounced off the glass as time expired.

"I tried getting as close as I could, and it really wasn't even a shot — I just threw it up and hoped and prayed that it went in. Unfortunately, it didn't," said McCauley, who as the buzzer sounded collapsed to the court with his jersey pulled over his head.

Greg Paulus scored 15 points and hit two 3s during Duke's frenetic comeback, sparking the burst by connecting from the top of the key with 3:52 remaining to make it 81-76. The Blue Devils hit five 3-pointers in the final 7 1/2 minutes.

"N.C. State really outplayed us the whole game except for the last 8 minutes," Nelson said. "Everything was going for them, but the thing about it is, we pulled together as a team. ... It just clicked for us — in the last 8 minutes, we started making the plays that we needed to win."