HOUSTON (AP)TJ McMahon threw for a career-high 334 yards, including a go-ahead 23-yard touchdown to Bradley Rozner with 25 seconds left, and Rice edged UTEP 37-30 on Thursday night.

Rice (5-4, 3-2 Conference USA) reached five wins in a season for the first time since 2015.

UTEP backup QB Calvin Brownholtz ran for a 25-yard score to tie the game at 27-all with 11:17 left in the fourth quarter. The teams traded field goals with UTEP tying it with 2:35 left.

Rice used back-to-back 13-yard plays to get to midfield and McMahon later found Rozner in the corner of the end zone for their sixth connection of the game.

McMahon was 21 of 31 with two touchdowns and one interception, and Rozner had 142 receiving yards and a score. Christian VanSickle made field goals of 43, 21 and 38.

Brownholtz was 7-of-10 passing for 56 yards and he carried it eight times for 64 yards for UTEP (4-6, 2-4). Gavin Baechle also made three field goals, with a long of 51.

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/ap-top25. Sign up for the AP’s college football newsletter: https://tinyurl.com/mrxhe6f2