ORLANDO, Fla. (AP) -- Close victories have defined Central Florida's season.
The 17th-ranked Knights got another one Friday night, and it was probably their most important yet.
Blake Bortles found Breshad Perriman for a 52-yard touchdown pass with 4:50 left in the fourth quarter to give UCF a 23-20 victory over South Florida on Friday night and keep the Knights on course for a conference title and BCS bid.
''I suppose somebody up there is watching over us,'' Knights coach George O'Leary said. ''Luck is when preparation meets opportunity and that's a lot of what is happening. We throw those routes a lot in practice and Blake threw it against the wind. It was a heck of a throw.''
The Knights won despite committing five turnovers, including three by Bortles, who entered the game with just seven on the season.
UCF (10-1, 7-0 American Athletic Conference) secured at least a share of the conference title. A victory against SMU next week will give it the title outright and the Knights' first bid to the BCS.
The win was also UCF's first over USF, which held a 4-0 series lead.
UCF now has now posted six victories this season by seven points of less.
''We were put in a situation where we had to get it done to win a championship and we did it,'' UCF center Joey Grant said. ''We put some good stuff together on those drives so you got to go to the sidelines and stay.''
USF (2-9, 2-5) had a final chance to win or send the game to overtime, but Jordan Ozerities intercepted Mike White's pass and returned 52 yards with 1:20 left in the game to seal the win.
The Bulls came into the game with nine offensive touchdowns on the season, but had a pair rushing scores by Chris Dunkley and Marcus Shaw.
Bortles finished 17 for 26 for 219 yards, with two touchdowns and two interceptions. He also had a fumble.
White, one of three quarterbacks USF has used this season, was surprisingly steady at times completing 15 of 34 passes for 211 yards. Andre Davis caught seven passes for 87 yards.
''At halftime I'm sure not that many people thought that we would come out and play as well on offense as we did in the second half,'' USF coach Willie Taggart said. ''Credit to our guys, they kept fighting.''
USF took a 20-16 lead early in the fourth quarter on a 1-yard touchdown plunge by Shaw with 14:17 left.
UCF took back over with 6:54 remaining, but Bortles was picked off on the first play of the drive to give the ball back to USF inside the Knights' 35.
The Bulls' ensuing drive stalled and a 51-yard field goal attempt by Marvin Kloss sailed wide right to set up the Knights go-ahead drive.
USF drove to UCF's 39 in its final drive, but White's third-down pass was intercepted by Jordan Ozerities.
Miscues by the Knights allowed the Bulls to stay in the game in the final 30 minutes.
Leading by seven at the break, UCF's fourth turnover of the game - a fumble by Bortles inside UCF's 30 - allowed USF to tie the game at 13-13 late in the third quarter.
The Bulls needed three plays to get into the end zone, scoring on a 13-yard end around run by Dunkley.
The Knights came right back, though, using a long kickoff return to Rannell Hall to set up 29-yard field goal by Shawn Moffitt to put them briefly back in front by three.
The first half had disastrous moments on both sides, though UCF managed just enough success to take a 13-6 lead into halftime.
UCF survived three turnovers, taking its first lead of the game late in the half thanks in part to failed USF gamble.
Leading 6-3, the Bulls went for it on fourth-and-2 on UCF's 8, but the snap from center Austin Reiter never reached White, and was recovered the Knights.
Though his team would eventually end up three points short, Taggart didn't second-guess his decision not to kick the field goal.
''No, I don't ever second-guess myself,'' Taggart said. ''If I make a call, it's going to be a legitimate call that I thought about and go for it. I felt like our guys could do it and we fumbled the snap. It happens.''
UCF's offense quickly went to work and capped a methodical 12-play, 92-yard drive that ate up more than 6 minutes with an 8-yard touchdown pass from Bortles to Justin Tukes that made it 10-6.
The win ties UCF's school record of seven straight victories.
''I definitely feel fortunate, but any team could easily throw in the towel and say 'hey it was a good season,' but we keep fighting,'' Grant said. ''Of course you feel fortunate, but we're making the plays happen. You've got to make things happen to win games and we've done that.''
Follow Kyle Hightower on Twitter at http://www.twitter.com/khightower