T.J. Warren scored 31 points to lead NC State to a 71-64 victory over Virginia Tech on Saturday.

Warren, the ACC’s leading scorer at 23 points per game coming in, connected on 12 of 21 for the Wolfpack (17-10, 7-7 ACC), who snapped a two-game losing streak and beat the Hokies for the fourth straight time.

Warren got off to a quick start, hitting 3-pointers on the Wolfpack’s first two possessions, as NC State never trailed. He hit 7 of 10 in the first half, scoring 17 of the Wolfpack’s 35 first-half points and helping NC State to a 35-25 halftime lead.

NC State led 61-46 after two free throws by Ralston Turner with 7:21 left in the game. But the Hokies scrambled back into the game late, using a 17-6 run to cut the lead to 67-63 on two Devin Wilson free throws with 36 seconds remaining.

Tyler Lewis pushed the lead to 68-63 after he made the first of two free-throw attempts with 34 seconds to go, and after Virginia Tech’s C.J. Barksdale missed an open 3-pointer, Lewis made 1 of 2 again from the free-throw line with 22 seconds remaining to give the Wolfpack a 69-63 lead. Lewis’ two free throws with 12.8 seconds left iced the game for NC State.

Lewis, who moved back into the Wolfpack starting lineup four games ago, scored eight points and played a tremendous floor game, handing out a career-high 11 assists and not turning the ball over in 36 minutes of action.

The Wolfpack also got a solid game from freshman Kyle Washington, who scored 13 points and made NC State’s only basket in the final four minutes. He had scored in double figures just twice all season.

Virginia Tech (9-17, 2-12 ACC), which has lost 12 of its past 13 games, shot better from the floor than NC State, hitting 42.9 percent (18 of 42) compared to 40.6 percent (26 of 64) for the Wolfpack. The Hokies also out-rebounded NC State (39-31), but they missed 15 free throws and turned the ball over 17 times.

Jarell Eddie and Wilson each scored 14 points for Virginia Tech. The Hokies played without starting guard Ben Emelogu (ankle), who is averaging 9.2 points per game.