RENO, Nev. (AP) — Flying high after last week’s win at Cal, Nevada appeared to be headed for a 2-0 start when star quarterback Cody Fajardo opened the game with three consecutive touchdown drives and the Wolf Pack built a 31-20 lead over South Florida with less than three minutes remaining.

But that’s when Bulls quarterback B.J. Daniels took charge, throwing a 52-yard touchdown pass to Chris Dunkley with 2:37 on the clock and then a 56-yard scoring toss to Andre Davis with 38 seconds left Saturday to come away with a 32-31 victory.

READ MORE: NBA fines Miami Heat $25,000 for violating 'bench decorum'

“That’s a real difficult loss,” Nevada coach Chris Ault said. “They’re a really good football team, no question about it.”

Cody Fajardo passed for 271 yards and a touchdown and ran for 134 yards and two more scores, and Stefphon Jefferson ran for 135 yards for the Wolf Pack (1-1), who had lost only once in their last 18 home games.

Davis, who also caught a 51-yard TD in the first quarter, finished with 12 catches for 191 yards.

Daniels, who also ran for 53 yards on 11 carries, completed 22 of 40 passes on the game for 363 yards. He completed 10 of 17 for 227 yards in the fourth quarter alone.

“B.J. Daniels is a great athlete,” Nevada safety Duke Williams said. “He’s mobile. He’s one of the better quarterbacks I’ve ever faced in college. He has great receivers around him which makes him even better.

“I give all the credit to South Florida, they came over here 2,500 miles and came out with a win. It’s a hard loss. We were up pretty much the whole game and they took it from us. The better team won.”

South Florida coach Skip Holtz said he was a bit nervous down the stretch.

READ MORE: Man faces several charges including pointing laser at BSO aviation unit

“B.J did a great job,” Holtz said. “Boy, he was poised. Even to the point where he was starting to (tick) me off a little bit he was so calm.”

Nevada, which moved this season from the Western Athletic Conference to the Mountain West, dominated early and led 21-13 at the half but Lamar ran 35 yards for a touchdown on South Florida’s opening drive of the second half to cut the lead to 21-20.

Fajardo, a sophomore, completed 27 of 38 passes on the game. He was practically flawless early, leading Nevada to touchdowns on its first three possessions, rushing for 88 yards in the first quarter and completing 9 of his first 10 pass attempts, including a 29-yard scoring toss to Joe Huber that put the Wolf Pack on top 21-6.

After a roughing the quarterback penalty against defensive end Brock Hekking, Demetri Murray got loose for an 18-yard run to set up his own 1-yard touchdown dive and Maikon Bonani converted the extra point this time to cut it to 21-13 9:20 before the half.

Nevada was driving again before Sam Barrington forced Jefferson to fumble and JaQuez Jenkins recovered on the USF 14. After Markus Smith was called for interfering with Sterling Griffin near midfield, Daniels completed a 57-yard pass to Terrence Mitchell at Nevada’s 13, but the officials ruled Mitchell had stepped out of bounds before that and the Bulls had to punt again.

Fajardo would have had three rushing touchdowns but fumbled in the end zone at the end of a 26-yard run on Nevada’s opening drive and tight end Zach Sudfeld recovered for his first career TD and a 7-0 lead less than 5 minutes into the game.

“In the fourth quarter, everyone was making mistakes,” Fajardo said. “It was one of those tough pills to swallow.

“We had a couple incompletions on big downs. I put that on me. We came out hot like we did last week. That was good. But we stalled and started losing momentum and guys started getting discouraged.”

MORE NEWS: Miami ex-Proud Boys leader Henry 'Enrique' Tarrio to stay jailed until Capitol riot trial

(©2012 CBS Local Media, a division of CBS Radio Inc. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)