C.J. Barksdale (42) screams after making a basket and being fouled in the second half of the Virginia Tech’s 105-92 win over Virginia Military Institute in Blacksburg. (Matt Gentry/AP)

When the final buzzer sounded and his team had tried its best to squander a 20-point lead, it was the player who had been stuck in Virginia Tech Coach James Johnson’s doghouse who ultimately rescued him from another momentum-crushing upset.

On a night when Virginia Tech scored more points in regulation than it had since a 1994 win over Virginia Military Institute, the Hokies needed a fast-break lay-in and a rim-rattling dunk by junior C.J. Barksdale in the final 70 seconds to hold off the Keydets, 105-92, at Cassell Coliseum on Monday night.

Barksdale finished with 16 points off the bench in his season debut, one shy of his career high after missing the first three games of the season for a violation of team rules. Johnson called the performance “gratifying,” even if it came with some cringe-worthy moments from the rest of the team.

“For him to have to sit out three games and then have to come back in and play this type of game, I didn’t know how soon he could come back and be as efficient as he was tonight,” said Johnson, whose team won its third straight since a season-opening loss to USC Upstate.

Senior Jarell Eddie poured in a team-high 21 points on just 12 shots, including a perfect 5 for 5 from three-point range, and freshman Ben Emelogu added 19 points in a reserve role, but Virginia Tech also allowed more points in a regulation win than it had since 1989.

More troubling is that VMI made things interesting late with the Hokies nursing a 20-point lead with under 11 minutes to play. Led by 22 points each from guards Rodney Glasgow (Good Counsel) and QJ Peterson, the Keydets chipped away at Virginia Tech’s advantage playing a fast and furious pace.

Once VMI implemented a full-court press, the Hokies committed four turnovers over the final 2 minutes 18 seconds, and their lead dwindled to 98-92 with just more than a minute remaining. Barksdale, though, came through in the clutch.

“I feel like we needed a play to get our momentum going,” he said. “It hurt being away, but I tried not to let that bother me.”

But it didn’t stop Johnson from calling the tense final minutes “unacceptable,” and he lamented how his young guards were sped up by VMI’s pace. Virginia Tech finished with 16 turnovers.

“It was just a lot of bone-headed mistakes,” Eddie said.

It ruined what had otherwise been a well-rounded effort from the Hokies. They hit a season-high 11 three-pointers and shot 52.2 percent from the floor. Nine of the 10 Virginia Tech players who entered the game finished with at least four points or five rebounds, and five finished in double figures in scoring.

Freshman Trevor Thompson had a career-high five blocks as the Hokies got 44 points from their bench and held VMI to 10-for-36 shooting from three-point-range.

Next up for Virginia Tech is a meeting with No. 1 Michigan State at Brooklyn’s Barclays Center as part of the Coaches vs. Cancer Classic on Friday night. Despite a disjointed effort Monday night, Johnson wasn’t ready to concede anything.

“Our plan,” he declared, “is to go up there and win.”

Syracuse survives scare

Jerami Grant scored 13 points and set up the go-ahead basket by Michael Gbinije for No. 9 Syracuse in a 56-50 victory over St. Francis (N.Y.) in an opening-round game of the Maui Invitational in Syracuse, N.Y.

MICHIGAN STATE 82, PORTLAND 67: In East Lansing, Mich., Keith Appling matched a career high with 25 points to help the Spartans pull away to beat the Pilots in their first game as a top-ranked team in 13 years.

DUKE 91, UNC ASHEVILLE 55: Jabari Parker had 21 points for the No. 6 Blue Devils in the opening round of the NIT Season Tip-Off in Durham, N.C.

FLORIDA 67, SOUTHERN 53: Casey Prather had 10 points and nine rebounds for the 16th-ranked Gators in Gainesville, Fla.

Baylor women rout Rice

Odyssey Sims scored 33 points as ninth-ranked Baylor won, 79-46, in Waco, Tex., to extend its nation’s-best home winning streak to 60 games.

The Associated Press contributed to this story.