DURHAM, N.C. — Fourth-ranked Virginia’s bid to beat top-ranked Duke at unforgiving Cameron Indoor Stadium crumbled in the frenetic closing minutes during a 72-70 loss on Saturday afternoon, knocking the Cavaliers from the unbeaten ranks.

Virginia (16-1, 4-1 ACC) was the last Division I men’s basketball team with an unblemished record. The Blue Devils ended their bid at perfection with an 8-1 run down the stretch, extending their lead to 69-61 with 44 seconds remaining on a pair of free throws from freshman forward RJ Barrett.

The Cavaliers got as close as 69-66 on Kyle Guy’s three-pointer with 24 seconds to play, but Duke (15-2, 4-1) made three of four foul shots in the final 20 seconds to seal the victory and join Virginia for a six-way tie for first place in the conference.

“I told the guys in the locker room it wasn’t our effort,” Cavaliers Coach Tony Bennett said. “It was just enough possessions where we were a bit unsound. We didn’t get a block-out, or we reached on the ball, or had a careless turnover.

“To beat a team like Duke in this setting, you’ve got to be at an A or an A-minus in those areas. We just were a little unsound.”

Forward De’Andre Hunter led Virginia with 18 points, including a cosmetic jumper as the final buzzer sounded. Guy added 14 points but went just 2 for 7 from three-point range. The junior guard entered shooting 46.7 from beyond the arc.

Barrett scored a game-high 30 points for Duke, and Zion Williamson added 27 on 10-of-16 shooting with nine rebounds in a game with 15 lead changes and 14 ties.

Barrett and Williamson scored 29 of Duke’s final 30 points over the final 15:37 in the second half, making all 10 of the Blue Devils’ field goals in that time.

“It’s a great win,” said Williamson, the projected top pick in the NBA draft, according to multiple mock draft websites. “We learned a lot from them. They’re a great team. They’ve probably had better nights where Ty Jerome and Kyle Guy are probably lights out, but they missed the shots needed them to miss, so we got the win.”

Virginia, seeking a second straight win at a packed Cameron Indoor, went 1 for 11 from the field late in the second half, including Guy and Jerome missing open three-pointers and Hunter missing a layup. Jerome had 14 points but shot 1 for 5 from beyond the arc.

The Cavaliers had their 13-game road winning streak end and dropped to 4-1 against ranked opponents.

The pace picked up considerably midway through the second half, with the teams exchanging the lead seven times in fewer than four minutes, including Guy’s blow-by layup with 12:04 to play to give Virginia 49-48 advantage.

“We need to find ways to win even when our shots aren’t going in,” Guy said. “I think there’s a lot of shots I think we wish we could take back and stuff like that, but we’ll learn from this game.”

The members of the starting lineup, in particular, for Virginia arrived at one of the sport’s most storied venues brimming with confidence after having contributed to last season’s breakthrough triumph in which the Cavaliers won there for the first time in 23 years.

The 65-63 victory that included Jerome intercepting an outlet pass and scoring in the closing stages ended Virginia’s 18-game slide at Cameron Indoor.This season’s Cavaliers, first in KenPom.com overall ratings, had been playing with even greater purpose to start the ACC schedule. Virginia beat its first four conference opponents by an average of more than 20 points, including most recently thumping No. 9 Virginia Tech, 81-59, on Tuesday night.

The Blue Devils, meantime, were seeking to avoid losing consecutive home games for the first time since 2016 after falling to visiting Syracuse, 95-91, in overtime on Monday night. Compounding that defeat was an injury to Duke starting point guard Tre Jones.

The freshman separated the AC joint in his shoulder during a collision with the Orange’s Frank Howard, leaving Jones out indefinitely, although according to reports, the severity of the injury is not as serious as first indicated.

The absence of Jones against Virginia left the Blue Devils not only without the ACC leader in assists (5.7) and assist-to-turnover ratio (5.7 to 1) but also perhaps the team’s top defender.

But Duke did welcome back Cam Reddish into the starting lineup, much to the delight of the frenzied crowd during pregame introductions. The freshman, among the Blue Devils’ trio of projected NBA lottery picks with Williamson and Barrett, missed the game against Syracuse with an illness.

Reddish and Barrett largely shared ballhandling responsibilities place of Jones, who took part in warm-ups but watched the proceedings from the bench as the Blue Devils led at halftime, 37-32.

“They have real talented players, but that was our game,” Jerome said. “We had that game. We made mistakes that we can control.”