WACO, Texas (AP) Backed up to his 1 after a sack and needing a field goal in the final two minutes to keep the Big 12's longest current winning streak alive, Charlie Brewer found a way to get Baylor another victory in its first game as a ranked team under coach Matt Rhule.

Brewer drove the Bears 97 yards to the tying kick on the final play of regulation, JaMycal Hasty ran for the winning score in the second overtime and No. 22 Baylor joined Oklahoma atop the Big 12 with a 33-30 victory over Texas Tech on Saturday.

Brewer was 24-of-37 passing for 352 yards, but threw his first three interceptions of the season. He ran for three touchdowns, including a 1-yarder in the first overtime. The Bears have won eight straight games going back to last season.

''I just feel like that's when the quarterback has to be at his best, when the game's on the line,'' Brewer said. ''I made my handful of mistakes earlier in the game. But as a quarterback you've just got to let it go and realize you've got a chance to win the game.''

Hasty's run came after Trey Wolff's 35-yard field goal for Texas Tech opened the second extra period, leaving the Bears (6-0, 3-0 Big 12) tied with the sixth-ranked Sooners. They are the only two teams to win each of their first three Big 12 games.

Texas Tech (3-3, 1-2), playing its third consecutive Top 25 opponent, got to the second overtime when TJ Vasher made a diving 2-yard catch on a nice lob throw by Jett Duffey for his only TD pass.

Duffey finished 31 of 42 for 362 yards and two interceptions. R.J. Turner had seven catches for 138 yards.

''We took a big step last week,'' Texas Tech coach Matt Wells said, referring to a win over Oklahoma State. ''One could argue we didn't win this game, maybe you didn't take a step. But I think we did.''

Texas Tech took a 20-17 lead on SaRodorick Thompson's second touchdown run, a 30-yarder with 1:37 left in regulation. Thompson finished with 28 carries for 153 yards and two touchdowns.

''We matched blow for blow,'' Wells said. ''That drive at the end of the game, with Jett and the crowd and the noise, it was precision. They threw and caught the ball. We made plays all the way down the field.''

After getting back up to the 1, Brewer had five completions for 74 yards, including an incredible 19-yard catch along the sideline by Denzel Mims.

Baylor got to the 5 before taking two more shots at Mims in the end zone. He couldn't hold onto one in traffic and then drew a defensive holding call that put the ball at the 2 with 3 seconds remaining. John Mayers then kicked a tying 19-yard field goal.

''I thought you saw resolve, grit and toughness from our team,'' Rhule said. ''To take it (97) yards, go down there and have a chance to score. It was truly a shootout in every sense of the word. Proud that we won it.''

Both teams had more than 500 total yards - 510 for Tech and 525 for Baylor. Both also had three turnovers.

THE TAKEAWAY

Texas Tech: The Red Raiders were close to upsetting a Top 25 team for the second week in a row for new coach Wells. They were coming off a 45-35 win over then-No. 21 Oklahoma State. Duffey has thrown for 786 yards in his two starts. Alan Bowman missed his third game in a row because of a shoulder injury, and senior transfer Jackson Tyner got the first start after he was hurt.

Baylor: While Brewer made bad throws on his interceptions, including a pick in the end zone after the Bears had gotten to the Tech 4 in the fourth quarter, he made the clutch plays on the final drive of regulation and in overtime. The Bears also won the first six games in 2016 under interim coach Jim Grobe, but then lost 15 of their next 17 games, including a 1-11 debut season for Rhule in 2017.

LOT OF PICKS

Texas Tech safety Douglas Coleman III intercepted Brewer's pass on the first play of the second quarter. It was his national-leading sixth pick, all of them coming in the past four games. Brewer had thrown 11 TD passes without an interception before that.

After Brewer was picked off early in the fourth quarter, Texas Tech drove to the Bears 21 before a nifty interception ended that scoring threat. Duffey's pass was tipped by Jordan Williams and into the hands of Clay Johnston.

Along with the interception, Johnston had 10 tackles and 1 1/2 sacks. But Johnston limped off the field after his interception with 9:16 left in regulation, and didn't return.

POLL IMPLICATIONS

Baylor avoided becoming the fourth Big 12 team this season to get ranked one week and then lose its next game. Kansas State, TCU and Oklahoma State all lost the week after getting into the Top 25, including the Cowboys at Texas Tech last week.

UP NEXT

Texas Tech: The Red Raiders are home against Iowa State next Saturday.

Baylor: The Bears play Saturday at Oklahoma State.

---

More AP college football: https://apnews.com/Collegefootball and http://www.twitter.com/AP-Top25

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.