North Carolina’s Garrison Brooks, left, and guard Kenny Williams, right, hold back Virginia forward Isaiah Wilkins for a rebound during the Cavaliers’ 71-63 win in the ACC title game at Barclays Center. (John McDonnell/The Washington Post)

Behind a masterful display of ball security and double-figure scoring from all three of its starting guards, the Virginia men’s basketball team defeated North Carolina, 71-63, to win the ACC tournament championship game Saturday night at Barclays Center.

The top-seeded Cavaliers (31-2) claimed their third ACC tournament title and second in the past five seasons under Coach Tony Bennett to secure an automatic bid to the NCAA tournament.

Guards Kyle Guy (16 points), Devon Hall (15) and Ty Jerome (12) combined to score 43 points, and with the ball in those players’ hands for the majority of the game, Virginia committed just four turnovers. The win gave the Cavaliers a single-season school record for victories.

“It’s a good thing to enjoy a moment like this,” Bennett said. “If you can’t enjoy this, being with this group of guys and seeing their heart, and we weren’t perfect, but we battled. To win the regular season and to win this means a lot. We know it comes from the hard work from a lot of people around us.”

Jerome’s three-pointer with just under three minutes to play gave the Cavaliers a 61-52 lead, and De’Andre Hunter made 6 of 8 free throws in the final minute to complete a sweep of ACC championships this season. Virginia won the regular season title by becoming the first school to win 17 games in the conference.

In extending its winning streak to eight, Virginia defeated North Carolina for a second time in the ACC tournament championship game and earned its third straight win in the series.

“I think it’s special,” Hall said. “I think it speaks to this group and how tough we are. We’ve been battling all season, so to be able grab this, I think it’s a special, special moment for us.”

Junior forward Luke Maye led the Tar Heels (25-10) with 20 points, including 15 in the first half. Senior guard Joel Berry II added 17 points for the sixth-seeded Tar Heels, who fell behind for good midway through the first half.

Virginia was ahead by one possession midway through the second half but later scored six points in a row to claim a 58-49 lead with 3:34 to play. Guy, named the tournament’s most outstanding player, scored the first four of those points on a floater off the glass and a contested jumper. Hunter then converted a difficult jumper before Maye scored his first points of the second half with a three-pointer.

A four-point halftime lead for Virginia grew to 48-39 with 15 minutes to go thanks to a 7-2 spurt in which Guy had a pair of assists. The first led to a two-handed dunk by center Jack Salt, and the second yielded a dunk by Isaiah Wilkins. In between those field goals, Devon Hall swished a three-pointer from the left side in front of the Cavaliers’ bench.

A counter from North Carolina came quickly, beginning with Brandon Robinson’s floater in the lane. Berry added a three-pointer, and Garrison Brooks made two foul shots to pull the Tar Heels within 48-46 with 11:43 left in the second half.

Virginia heads back to Charlottesville to await its seeding in the NCAA tournament, all but assured of the No. 1 overall seed when the field of 68 is announced Sunday. The Cavaliers probably are bound for Charlotte for the first weekend of the sport’s showcase event.

The reigning national champion Tar Heels, meanwhile, steadied themselves in Brooklyn after limping into the ACC tournament losing two in a row, including the annual regular season finale against Duke, 74-64, on March 3 at Cameron Indoor Stadium.

But North Carolina regrouped to reach its 35th ACC tournament final, ousting its contentious cross-state rival in the semifinals behind three-point shooting defense and five players scoring in double figures.

The meeting between North Carolina and Virginia was the teams’ second this season, with the Cavaliers winning Jan. 6, 61-49, at John Paul Jones Arena behind a defensive gem. Virginia limited the Tar Heels to just under 30 percent shooting and forced 19 turnovers leading to 25 points.

The Cavaliers used more of the same to advance to the ACC tournament championship game for the ninth time. They beat No. 4 seed Clemson in Friday night’s semifinals by holding the Tigers to 35 percent shooting and collecting 14 points off 13 turnovers.

Virginia opened the ACC tournament title game with similar intensity, forcing three turnovers in the first four minutes to open a 10-5 lead at the first television timeout. Hall led the charge with a pair of three-pointers, and Wilkins had a steal, underscoring why he was selected ACC defensive player of the year.

“They’re really tough-minded,” North Carolina Coach Roy Williams said. “They’re really intelligent. They realize who they are, and they play to their strengths and stay away from their weaknesses, and as a coach, you have to admire that.”

The lead grew 34-24 with 2:30 to go in the half after Hall made both ends of a one-and-one to cap a 13-4 burst featuring six consecutive points from Jerome. The sophomore guard sank two shots in that stretch while drawing contact both times.

The Tar Heels scored the final six points of the first half, and Virginia led 34-30 heading into the locker room.