WACO, Texas (AP) Nobody has to tell West Virginia coach Dana Holgerson that Baylor can put up points in a hurry. The Mountaineers gave up 62 and 73 points in their first two trips to Waco.

But Holgerson didn't expect his team would need to stop a two-point conversion and recover an onside kick to win after carrying a 25-point lead into the fourth quarter all while facing a freshman quarterback.

That's exactly what happened, though. Xavier Preston sacked Charlie Brewer on a two-point try with 17 seconds left and No. 23 West Virginia withstood a furious fourth-quarter Baylor rally to escape with a 38-36 win Saturday night.

''At the end of the day we made a play at the end, and then we recovered the onside kick,'' Holgerson said. ''That's two years in a row we've recovered an onside kick against these guys to seal the games. I'm proud of the way the guys did that. So we'll take the win, and we're excited to get out for the first time with a win.''

Will Grier threw for five touchdowns to pad his national lead with 26 for the Mountaineers (5-2, 3-1 Big 12), who led 38-13 at the start of the fourth quarter.

That's when Brewer entered the game for Baylor and began to turn things around with his scrambling ability. He was 8-for-13 passing for 109 yards and two touchdowns and fellow freshman Treston Ebner had 109 yards and two touchdowns receiving and a 40-yard scoring run. Ebner's 9-yard TD catch from Brewer drew Baylor within two, but Preston got immediate pressure on the two-point try and ended Baylor's chances.

''We thought we had a good play to convert,'' Brewer said. ''I need to do a better job of getting rid of the ball in that situation.''

David Sills V caught three of Grier's scoring strikes to run his total to 15, also tops in the nation. Two of his touchdowns came on back-to-back plays from scrimmage, spanning the first and second halves. The first of those was a 16-yard strike with one second left in the first half, with the latter coming on a 53-yard catch and run off a quick slant 18 seconds after halftime that pushed West Virginia's lead to 24-6.

''They gave us a lot of coverages on film, so we weren't actually sure what we were going to get,'' Sills said. ''We went in with a pretty basic game plan. We knew we could take some shots and play off of their corners and in their secondary. That's what we tried to do.''

The first Grier-to-Sills connection was a jump ball in the back of the end zone, a 35-yarder that put West Virginia ahead 10-0 late in the first quarter.

''Will Grier was sensational, I thought David Sills, (receiver) Gary Jennings were sensational,'' Baylor coach Matt Rhule said. ''They did a nice job making big plays. A lot of the big plays I thought we were in good coverage and good position, and they made a play we needed to make. I take my hat off to them, Coach Holgerson and the job they did.''

Baylor (0-7, 0-4) managed two Connor Martin field goals in the second quarter to pull within 10-6 and got into the end zone for the first time on a 7-yard run from John Lovett in the third quarter. West Virginia immediately answered with Grier connecting with Marcus Simms from 40 yards out and Ka'Raun White for a 6-yard TD. At that point, Grier had as many touchdown passes as incompletions and West Virginia was in control.

Baylor quarterback Zach Smith was 16 of 27 for 261 yards in his three quarters of action.

THE TAKEAWAY

West Virginia: The Mountaineer defense dominated up front in the first three quarters. They entered with only seven sacks all season but added six against Baylor. They had a harder time corralling Brewer than the more-stationary Smith, but finally got to him when it mattered most.

Baylor: The Bears have mastered the art of giving a ranked team a scare at home. The next step is winning one. Baylor had a third-quarter lead and pushed then-No. 3 Oklahoma to the brink in a 49-41 loss its last time out at McLane Stadium on Sept. 23. The Bears actually outgained West Virginia 497-493, thanks to a 230-11 advantage in the fourth quarter.

POLL IMPLICATIONS

West Virginia isn't likely to move much either way, since most of the teams around them in the poll also won. The Mountaineers have a better chance to make a move next Saturday against Oklahoma State.

SMALL, BUT LOUD

Much of the announced crowd of 45,389 had left the stadium by the time the Bears rallied. Those who stayed were loud and behind a Baylor defense that forced two three-and-outs in the fourth quarter.

''There's going to be a day when we win and we win a lot. We'll always know our value to the university,'' Rhule said. ''When it all comes together, these guys are going to be something else. For the people that stayed until the end, I'm grateful and our players are grateful. Hopefully we honored them.''

UP NEXT

West Virginia: Hosts No. 10 Oklahoma State on Saturday to begin a stretch of three of four games at home.

Baylor: Hosts Texas next Saturday.

---

More AP college football: http://collegefootball.ap.org and http://www.twitter.com/AP-Top25

Copyright 2017 by STATS. Any commercial use or distribution without the express written consent of STATS is strictly prohibited.