Follow CBSDFW.COM: Facebook | Twitter

MORGANTOWN, W.Va. (AP) — Skyler Howard did just enough on an erratic night to secure West Virginia’s first 10-win regular season in a decade.

Howard threw two touchdown passes and ran for another score, and No. 14 West Virginia held on for a 24-21 victory over Baylor on Saturday in their Big 12 regular-season finale.

After the game, West Virginia athletic director Shane Lyons announced in a statement that coach Dana Holgorsen was given a five-year contract extension to 2021.

Justin Crawford rushed for 209 yards for the Mountaineers (10-2, 7-2). They came from 11 points down in the first half to hand Baylor (6-6, 3-6) its sixth straight loss after a 6-0 start.

“I guess it’s fitting that in a year where we battled and fight to get to 10 wins, we get to it in the hardest way possible,” Holgorsen said.

Howard improved to 19-8 as a starter. He received the loudest ovation from the crowd as players were introduced on Senior Day and he ran to midfield to hug his mom, Deidre Kelley.

“All he does is win,” Holgorsen said. “That’s his career. That’s his legacy. He’s a smart, competitive kid.”

Baylor held the momentum for nearly three quarters in the final regular-season game for acting coach Jim Grobe, but that changed on two plays.

Howard, having one of his worst games of the season, threw to Gary Jennings over the middle and he turned it into a 58-yard scoring play.

After Baylor got the ball back, Marvin Gross stripped quarterback Zach Smith, and Darrien Howard recovered for West Virginia. An unsportsmanlike penalty on Baylor gave the Mountaineers the ball at the Bears 6, and Skyler Howard scored on a 1-yard sneak on fourth down for a 24-14 lead.

Smith threw a 43-yard TD toss to Ishmael Zamora with 2:40 left in the game and the Bears got the ball back following a punt. But Smith was stripped of the ball on a pass attempt and Darrien Howard recovered at the Baylor 30 with 27 seconds left.

“We actually played better today,” Grobe said. “I’m just proud of the way our kids have hung in there with a freshman quarterback. We’ve really been an undermanned football team all year. It affects not only our depth on the field but also our practice.”

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)