MORGANTOWN, W. Va. — Primetime football returned to Milan Puskar Stadium in an explosive fashion as West Virginia edged Baylor 43-40 in a memorable contest on Thursday night.

The Mountaineers wanted to generate turnovers, and that’s exactly what they did as they took the ball away from Baylor three times in key situations. That made the difference in the win as they turned those takeaways into 14 points.

WVU’s offense came out to an efficient start, driving 65 yards in eight plays. JT Daniels was a perfect 4-for-4 on the drive and Tony Mathis Jr. punctuated it with a 7-yard touchdown.

Baylor stormed back to take the lead. The Bears scored 17 straight points in their next three drives as their offense began to find vulnerabilities in the WVU secondary.

By halftime, quarterback Blake Shapen had 294 yards and two touchdowns with a 240.5 passer rating.

WVU’s defense came up with a timely turnover with just under three minutes remaining in the first half. Sean Martin stripped Shapen as he rolled to his right, forcing a fumble that was recovered by Jasir Cox. The fifth-year scooped the loose ball and returned it 65 yards to tie the game.

The lead went right back into the hands of Baylor just five snaps later as the Bears continued their assault on the WVU secondary. Craig Williams was the scoring man, making a 39-yard grab and breaking some tackles to give Baylor a touchdown lead at halftime.

The third quarter was all offense. WVU and Baylor each got the ball twice in the period and turned both drives into touchdowns, but BU’s second touchdown may have put the Bears in more jeopardy than intended.

Instead of gaining a seven-point lead, WVU’s Dante Stills blocked the extra point, setting Jacolby Spells up to recover it and take it 85 yards to give WVU two points and hold the BU lead at four.

WVU again gave itself an opportunity with less than 10 minutes left as its defense stopped a steamrolling Baylor rushing attack. Aubrey Burks stripped Qualan Jones and Cox fought through the pile to get his second fumble recovery of the game.

The Mountaineers turned that into a touchdown on the ensuing drive as Mathis Jr. put WVU in the lead for the first time since the opening quarter with a 34-yard rushing score.

West Virginia seemed to put the game to bed with just over three minutes left when Aubrey Burks grabbed his first interception on the WVU 19 yard line. Two plays later, though, Daniels gave the ball back to Baylor with an interception of his own in threatening territory.

WVU’s defense held up, preventing the Bears from gaining any yards, but they did tie the contest up with a 44-yard field goal.

The Mountaineers got the ball back with 93 seconds left as both teams possessed three timeouts each. They quickly chunked their way down to the field as they fed Mathis, who carried the ball three times to get WVU inside the 10 yard line.

WVU ran the ball with Mathis three more times to drain Baylor of their timeouts, then called on Casey Legg to kick a go-ahead field goal with 33 seconds on the clock, which he made.

Baylor attempted four deep heaves to steal the win, but they all fell unsuccessful as WVU held on to win.

Mathis finished the game with 163 yards — a career-high — and two touchdowns in the win. WVU ran for 217 yards as a team, which more than doubled the average yardage allowed by Baylor’s defense.

Daniels threw 24-for-37 with a touchdown and an interception. Prather was his favorite target, making eight catches for 109 yards and a score.

Gavin Holmes led the game with 210 yards receiving on seven catches with a touchdown. Blake Shapen finished 14-of-22 for 326 yards and two scores before an early exit with an injury.

The victory is WVU’s first of the season in the Big 12. The Mountaineers improve to an even 3-3 with the win.