BLACKSBURG, VA. — Fans clad in Virginia Tech gear lined up around the block well before tip-off of the men’s basketball game against 10th-ranked Duke on Friday night, hoping for another upset of an ACC blue blood that has encountered recent ­travails at Cassell Coliseum.

The Hokies, after all, had beaten the five-time national champions in three straight at home. Early in the second half of this one, momentum tilted again toward Virginia Tech after it opened a seven-point lead, leading to a timeout from Blue Devils Coach Mike Krzyzewski.

The promise for the Hokies deteriorated rapidly thereafter amid stagnant offense, turnovers and a loss of composure from leading scorer Lander Nolley II, whose flagrant foul in the final minutes encapsulated Virginia Tech’s frustration in a 77-63 loss, its third in a row.

“I thought they got up under his chin,” Hokies Coach Mike Young said of Nolley. “I didn’t think he handled it very well.”

The sequence in question came with 4:23 to play when Nolley delivered a forearm to Duke’s Wendell Moore Jr. with Virginia Tech (6-3, 1-1) attempting to initiate its offense while trailing ­66-57. Officials called Nolley for an offensive foul before assessing a Flagrant 1 upon video review.

Young removed Nolley from the game, Moore made a pair of free throws, and the Blue Devils (9-1, 1-0) expanded the margin to 71-57 with 3:55 remaining thanks to Alex O’Connell’s three-pointer that was part of a 23-5 run over the final 11 minutes.

Nolley committed nine turnovers, including six in the second half, compared to just seven total for the Blue Devils. The redshirt freshman finished with seven points, all in the first half, for his lowest output of the season and the first time he has failed to reach double figures.

Nolley, a two-time ACC freshman of the week who entertained thoughts of transferring after former coach Buzz Williams departed for Texas A&M but elected to stay following conversations with Young, looked out of sorts after such a promising start to his Hokies career.

“I let the coaches down. I let my team down, and that’s the reason we lost,” he said.

There were plenty of other culprits as well, including uncommonly poor three-point shooting. The Hokies made just 5 of 20 from beyond the arc, with P.J. Horne (team-high 15 points) the only player with more than one three-pointer.

Virginia Tech had entered the game shooting 43 percent from three-point range and amassing roughly 47 percent of its points from beyond the arc, prompting Krzyzewski to craft a game plan in which his entire lineup on the floor was able to switch defensively.

The tactic worked particularly well in the second half, when Virginia Tech missed 6 of 7 three-pointers. The Hokies also committed 10 turnovers in the second half and scored just 22 points, appearing almost helpless as Duke, which has won three in a row, began asserting itself after trailing 52-50 with 11:11 to go.

“We played great, great defense,” Krzyzewski said. “Tre [Jones] led us, but two kids who had been playing well, Wendell and Alex, came [up big]. . . . Wendell was a plus-24 in the game, and Alex had a couple that just missed and then he hit two big ones.”

The comeback for the Blue Devils began in earnest with a 12-3 spurt that included a floater and a layup from Moore and Jones’s reverse layup that provided a 62-57 lead, compelling Young to call a timeout with 7:10 ­remaining in the second half.

But Duke soon after reeled off 11 in a row, during which time Nolley committed the flagrant foul.

Jones led the Blue Devils with 15 points, and Moore and center Vernon Carey Jr. each added 12 for Duke’s first win in Blacksburg since Feb. 25, 2015. And even then Duke had to go to overtime, with the Hokies winning at Cassell in 2016, 2018 and last season.

“We beat a really good team tonight,” Krzyzewski said. “Since the Michigan State game [a 71-66 Hokies win Nov. 25], I’ve watched all their games, and for Mike to put in this system, this quickly, and play this well, it’s a heck of thing. They’re going to be a tough out; they have been. They’re going to be a tough out the whole season.”