FORT MYERS, Fla. — In the consolation game of the Fort Myers Classic, No. 24 Virginia rallied for a 56-54 win over West Virginia on Wednesday night at Suncoast Credit Union Arena.

Sophomore forward Ryan Dunn and senior guard Reece Beekman each scored in double figures to lead the Cavaliers (5-1), who’d suffered a one-sided loss to Wisconsin on Monday night in their first game at this event.

Dunn finished with 13 points, five rebounds, two steals and one blocked shot. Beekman totaled 12 points, four rebounds, five assists and four steals. His assists and steals were game highs. West Virginia native Isaac McKneely, a sophomore guard, added eight points and five boards for the Wahoos.

Rebounding has been UVA’s biggest weakness this season, and West Virginia (2-3) won the battle 41-28. But the Hoos came down with two offensive rebounds in the final eight seconds—the first by redshirt freshman Leon Bond III, the second by Dunn—and that allowed them to secure a hard-earned win.

Virginia went halftime leading 26-23. Two players—Quinn Slazinski and former Syracuse center Jesse Edwards—accounted for 21 of the Mountaineers’ points in the first 20 minutes, but their teammates heated up in the second half.

After the Wahoos went up by 10 with 13:00 remaining, West Virginia hit four 3-pointers in a three-minute span to take a 42-40 lead. There were six lead chances in the final 7:25.

The Mountaineers took their final lead, at 51-50, on a trey by Seth Wilson with 1:55 to play. Beekman answered with a drive at the 1:28 mark, and then Dunn scored inside to put the Cavaliers ahead 54-51 with 45 seconds left.

At the other end, though, Dunn then fouled Slazinski on a 3-point attempt. Slazinski, who finished with 17 points, sank all three free throws to make it 54-54 with 36.8 seconds to play.

On the next possession, the ball came to Dunn on the right wing. His 3-point attempt was off the mark, but the 6-foot-5 Bond grabbed the rebound, and Beekman was fouled on a drive. He hit his first free throw to make it 55-54. His second was off the mark, but the 6-foot-8 Dunn soared for the rebound and was fouled with four-tenths of a second to play.

After Dunn made his first free throw, his second missed, and time expired before the Mountaineers could heave the ball toward the basket.

The Hoos don’t play again until next Wednesday, when they host No. 12 Texas A&M in an ACC/SEC Challenge game at John Paul Jones Arena. The 7:15 p.m. game will air on ESPN2.

The Aggies are in their fifth season under head coach Buzz Williams, who previously held that position at Virginia Tech.