David Wilson carries the ball 26 times for 138 yards as the Hokies virtually abandon the passing game and amass 241 yards on the ground to hold off a determined East Carolina squad. (Karl DeBlaker/AP)

— Perhaps later in the college football season, when he’s had more time to reflect, Coach Frank Beamer will shake his head and laugh at how his 200th career win at Virginia Tech came to be.

But after the Hokies suffered through a wave of miscues and barely escaped with a 17-10 win over East Carolina on Saturday, Beamer felt compelled to begin his postgame news conference by apologizing for his team’s performance.

On a sloppy afternoon in which the Hokies were flagged for 12 penalties, committed two turnovers and didn’t take their first lead until the fourth quarter, it only makes sense that Virginia Tech is starting a season 2-0 for the first time since 2006 because of two Beamer calling cards: a powerful running game and a dominating defense.

“We had a wake-up call and we went to work and fortunately we came out on top,” said running back David Wilson (26 carries, 138 yards). “The objective of this game is to have more points than the opponent, and we pulled it out from somewhere.”

Wilson was the ringleader for a three-headed rushing attack that churned out 241 yards on the ground, much of it after initial contact. But it was senior Josh Oglesby (nine carries, 43 yards) who ran in both Virginia Tech touchdowns, including the deciding score on a 10-yard run midway through the fourth quarter to cap off a 13-play drive that featured 11 running plays.

Redshirt sophomore Logan Thomas was even featured prominently, gaining 66 yards on 11 carries, as play-caller Mike O’Cain dialed up numerous designed runs for the 6-foot-6, 254-pound quarterback.

That, though, was more a result of an ineffective passing attack. Thomas finished just 8 for 20 for 91 yards. He also threw his first career interception and nearly had several other passes picked off by a Pirates defense that had given up 45 or more points in six of its past seven games heading into Saturday.

Perhaps the only positive came when senior wide receiver Jarrett Boykin (four catches, 48 yards) broke Virginia Tech’s all-time receptions record early in the second quarter.

East Carolina “definitely gave us all we could handle, just a lot of the pressure they were bringing,” Thomas said. “They were shutting down a lot of our passing lanes, and I also [had] a couple errant passes that I wish I could have back.”

Fortunately, though, the Hokies defense looked as intimidating as ever.

Facing a high-flying East Carolina attack that averaged 37 points per game last year, Virginia Tech allowed just 112 total yards, including minus-15 rushing yards.

The Hokies also got an interception for the ninth consecutive game and sacked Pirates quarterback Dominique Davis (20 for 38 for 127 yards) five times — validation for a unit that struggled to stop the run a year ago and features six new starters this season.

“There was a lot of question marks coming into the season about us and our young guys, but I’m really proud of them,” middle linebacker Bruce Taylor said. “They really stepped up today. I think you can throw that young guy out the window. We’ve got two games under our belt against two quality teams.”

But thanks to a number of errors, the Hokies found themselves a 7-3 hole at halftime.

A week after committing just four penalties against Appalachian State, Virginia Tech was flagged eight times in the opening 30 minutes. Two of them voided interceptions by safety Eddie Whitley and cornerback Jayron Hosley.

East Carolina’s lone touchdown of the game — a two-yard run by running back Michael Dobson in the first quarter – came courtesy of prime field position after a 30-yard punt by Virginia Tech’s Scott Demler.

Then, early in the second quarter, wide receiver Marcus Davis dropped what would have been a 38-yard touchdown pass from Thomas. Four plays later, East Carolina safety Damon Magazu came up with a spectacular interception, somehow keeping his toes in bounds after Thomas tried to find Boykin on a fade route in the end zone.

Virginia Tech’s only points of the first half came from a 39-yard field goal by Cody Journell with 44 seconds remaining in the second quarter.

But the Hokies started the second half in dominating fashion, with Oglesby finishing an eight-play, 78-yard drive to give Virginia Tech its first lead of the game, 10-7. Two plays later, cornerback Kyle Fuller intercepted a Davis pass. From there, the template for the rest of the afternoon was set.

“We hung in there and we battled and found a way to win,” Beamer said. “Sometimes when you can learn a lesson and still win, that’s a good deal.”