HOUSTON (AP) Baylor was happy to escape with a win against Rice on Saturday night.

The Bears might have been even happier with the wakeup call they received.

Charlie Brewer threw for 303 yards and a touchdown, Denzel Mims caught six passes for 102 yards and Baylor held on to beat Rice 21-13.

''I believe this with all my heart - we needed that game,'' Baylor coach Matt Rhule said. ''We needed that experience.''

Brewer threw a 50-yard touchdown pass to Chris Platt with five minutes left in the second quarter, and ran for a 25-yard touchdown with 15 seconds left in the first half as the Bears (3-0) built a 21-3 halftime lead. Brewer finished 20 of 27 and rushed 12 times for 58 yards.

''I think it will be good for us in the long run starting next week because it will be a four-quarter game next week,'' Brewer said. ''I thought the defense obviously played really good. The offense, it was frustrating because we couldn't capitalize on a lot of drives.''

Platt finished with 85 yards with the touchdown on five catches. Josh Fleeks put Baylor on the board with three minutes left in the first quarter. Baylor outgained Rice 427-242.

''We preached all week that we should expect a fight because obviously, Rice, they're hungry for a win just like everyone else,'' Baylor linebacker Clay Johnston said. ''I'm kind of thankful we had the dogfight today because we had to actually play for four quarters.''

Rhule said he thought his team relaxed at the half.

''That's completely on me,'' Rhule said. ''We had as bad a second half as you can have until Denzel makes that great, great play at the end.''

Wiley Green finished 13-of-23 passing for 128 yards in his return after missing last week with a neck injury. Tom Stewart was 5 of 8 for 50 yards and rushed for a 21-yard touchdown with 8:42 left in the fourth quarter to pull Rice within eight. Brad Rozner caught seven passes for 100 yards for the Owls (0-4).

''They threw the ball effectively and didn't miss any throws,'' Rice coach Mike Bloomgren said of his quarterbacks. ''They gave our guys a chance.''

The Owls had the ball and a chance to tie with three minutes left in the game, but two sacks ended the drive.

''When the game was on the line, and our defense had gotten us the ball back with a chance to tie it, they just came at a level where we couldn't protect the quarterback,'' Bloomgren said. ''They overwhelmed us offensively, and we didn't give ourselves a chance.''

The Bears iced the game with a 13-yard pass from Brewer to Mims with a minute left for a first down.

''You're going to have games like this, and good teams find a way to battle through these games,'' Rhule said. ''I've had a lot of games like this where you have to find a way to win.''

THE TAKEAWAY

Baylor: The Bears defense did well throughout the game and kept the Owls offense quiet. The Owls finished with 64 yards rushing. Baylor's defense looks ready for Big 12 play, but the offense went quiet in the second half.

''I've been telling our team this whole week `Hey you better be ready,''' Rhule said. ''One of the most dangerous things is a team coming off a big loss. They're going to be ready to play. I thought our defense showed a lot of resolve, and I thought our team showed a lot of resolve at the end of the game, so I'm proud of those things.''

Rice: The Owls had two field goals from Will Harrison, but struggled to get in the end zone. Rice had three drives of 10 plays or more, but settled for the two field goals and a turnover on downs. Rice's defense did well to keep the high-powered Baylor offense out of the end zone.

''That was the number one scoring offense coming into the game today, and our defense held them scoreless in the second half,'' Bloomgren said.

TURN OFF THE LASER

Once in the first half and once in the second half, play was stopped due to a laser being pointed at the offense. In the fourth quarter, play was stopped for around five minutes as officials sought out the culprit.

PRIDE MESSAGE

Rice's marching band played ''YMCA'' by the Village People as dozens of students and alumni rushed the field with rainbow flags during halftime.

Some LGBTQ students at Baylor and alumni of the private Baptist college in Waco, Texas, are seeking to be recognized by the school.

A Baylor spokeswoman told the Houston Chronicle the college's administration declined earlier this month to officially recognize and charter Gamma Alpha Upsilon, an LGBTQ-student group on campus.

UP NEXT

Baylor: Hosts Iowa State on Saturday to begin Big 12 play.

Rice: Hosts Louisiana Tech on Saturday to start Conference USA play.

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.