ORLANDO, Fla. — Everyone knows anyone can win a rivalry game.

In a rivalry that has been so closely contested as the War on I-4 has, with both teams entering Friday's contest with six wins apiece, anything could happen. UCF had won its last four, but still adjusting to a new coach and playing a backup freshman quarterback for most of the season, the Knights knew they woul dhave their work cut out for them to make it five in a row in the series.

The heavily-favored Knights typically known for their offense would need their defense to step up to take down the struggling 2-9 Bulls.

Missed field goals and late penalties gave USF a breath of life. But Tre’mon Morris-Brash sacked Timmy McClain on the final play of the game and UCF held off South Florida 17-13 in an American Athletic Conference finale on Friday.

McClain drove the Bulls from their own 11-yard line down to the UCF 3 using 2:43 to get off 11 plays before running into Morris-Brash.

The Knights escaped not only with the rivalry win but an 8-4 season and a bowl game ahead of them for a school-record sixth straight year.

Despite facing adversity all season long, startign with the early season injury to star quarterback Dillon Gabriel, the Knights were happy to finish the regular season on a good note.

"This is probably the most challenging coaching I have but it will be one of the most rewarding," UCF coach Gus Malzahn said. "I just keep telling myself we are building this thing we are building this thing."

Even though USF fell short of the upset and their own strong note to end the season, former Seminole High School and now-USF quarterback Timmy McClain was impressive, going 18 for 29 with 22 passing yards.

McClain made plenty of freshman mistakes, taking six sacks including the decisive one on the final play. But he made plays with his legs. His impressive 80-yard drive nearly set USF up for the winning score.

Bulls coach Jeff Scott had praise for his quarterback who is set to start next year as the Bulls look to build on a strong finish to the season.

Johnny Richardson rushed for 94 yards on just eight carriers for UCF. Keene was 14-of-26 passing for 115 yards.

Jaren Mangham carried 21 times for 93 yards for the Bulls. McClain completed 18 of 29 passes for 222 yards.

USF's season ends with the loss. But UCF will await its bowl destination next Sunday after the conclusion of the college football regular season.