"I think it's as sloppy defense as I've ever seen just as far as making plays," O'Leary said. "You know the coverage wasn't good and things you've got to -- you can't do in games and expect to win. Disappointing."

The contest featured major defensive lapses by both teams.

UAB freshman kicker Ty Long hit a 40-yard field goal with 21 seconds remaining to clinch the Blazers' first win of the season.

Blazers senior starting quarterback Bryan Ellis, senior starting running back Pat Shed and senior starting left tackle Matt McCants all missed the game due to injury, but backup sophomore quarterback Jonathan Perry proved to be more than capable of shredding the Knights' defense. The Blazers racked up 394 yards of total offense in the first three quarters alone, ripping through Conference USA's highest rated defense.

UCF countered with its own quarterback change in the fourth quarter. Redshirt freshman Blake Bortles quickly exploited soft spots in the Blazers' defense and junior reserve running back Latavius Murray scored a 2-yard touchdown to cut UAB's lead to 23-21 with 10:18 left in the game. After the defense got a critical fourth-down stop, Bortles led UCF down the field again and freshman kicker Shawn Moffitt hit a 24-yard field goal to push the Knights ahead 24-23 with 5:02 remaining in the game.

Bortles had one last shot at a comeback, but he threw an interception as time expired. The play inspired the Blazers to rush the field, savoring their first victory of the season.

"The satisfaction of winning a football game is mighty big for us," UAB coach Neil Callaway said.

UCF players held back tears while trudging into and out of the locker room after the game.

O'Leary lamented the decision to stick with sophomore quarterback Jeff Godfrey until the fourth quarter. The Knights trailed UAB 23-14 when Bortles entered the game.

"I thought we should have put Blake in sooner," O'Leary said. "Obviously he had a little better grasp of what was going on out there. Again, offensively probably could have done more."

Bortles was 6-of-10 passing for 102 yards and one interception. Godfrey was 13-of-22 passing for 133 yards and one interception. Godfrey also rushed for 13 yards on three carries. Neither quarterback was sacked.

When O'Leary was asked after the game if he would consider a quarterback change, he responded, "I'll deal with that tomorrow. Obviously, Bortles went in and did a nice job. I want to sit down with the offensive staff with that and just see what their thoughts are."

UCF led the contest for most of the first half.

Knights freshman Rannell Hall ran back the opening kickoff 35 yards to put UCF in good field position.

Godfrey connected on back-to-back 10-yard passes to sophomore Dontravius Floyd and redshirt freshman J.J. Worton. Junior running back Brynn Harvey then tacked on a 29-yard touchdown run, Freshman kicker Shawn Moffitt hit the extra point to give the Knights a quick 7-0 lead with 13:44 left in the first quarter.

Perry then led the Blazers on an efficient scoring drive, marching from its 24-yard line to the end zone thanks to a mix of quarterback scrambles and screen passes.

It was the first sign the Knights might have big headaches controlling the dual-threat quarterback.

Hall had another big kickoff return, setting up the Knights' second scoring drive. Harvey ran for 1-yard touchdown, capping a seven-play, 44-yard drive. Moffitt hit the extra point to push UCF ahead 14-7.

The defenses stepped up later in the first quarter. UCF forced UAB to punt on its second drive, while Moffitt missed a 45-yard field-goal attempt on the Knights' third possession.

The Blazers picked up the pace again in the second quarter.

Perry connected with sophomore tight end Nolen Smith for a 22-yard touchdown pass.

On the next drive, the Knights went for it on fourth down but came up one yard short of a first down in UAB territory.

After a defensive stop, Godfrey was leading UCF on what looked like another promising drive. However, UAB intercepted one of his passes and returned it to the Blazers' 36-yard line with about 30 seconds left in the second quarter. Long hit a 46-yard field goal as time expired in the second quarter to give the Blazers their 16-14 halftime advantage.

UCF's defense narrowly avoided giving up two more touchdowns thanks to interceptions by A.J. Bouye and Ray Shipman.

The Knights return to Orlando and will work on correcting yet another big pile of mistakes while preparing to host Memphis (1-6 overall, 0-3 in C-USA) Oct. 29 for homecoming.