TAMPA, Fla. (AP) -- D'Eriq King kept Houston's hopes alive with a 30-yard completion on fourth-and-24, then finished a game-winning drive with a 20-yard touchdown run with 11 seconds remaining, lifting the Cougars over No. 17 South Florida 28-24 on Saturday.
The sophomore who has split time between receiver and quarterback replaced starter Kyle Postma in the first half. He began slowly before leading Houston (5-3, 3-2) on three long scoring drives to position themselves for an upset.
King threw a 39-yard TD pass Courtney Lark early in the third quarter. Mulbah Car scored on a 4-yard run to make it 14-14, and King finished a 75-yard march with a 3-yard TD that made it 21-all with 6:20 remaining.
Quinton Flowers, who threw for 325 yards and scored on runs of 1 and 3 yards for USF (7-1, 4-1), did all he could to give the Bulls a chance to remain unbeaten.
Emilio Nadelman's 30-yard field goal gave USF a 24-21 lead, but also left King with 1:46 to end the nation's longest winning streak at 12 games.
The quarterback's 30-yard completion to Lark prolonged the winning march.
King finished 12 of 20 passing for 137 yards and one TD. He also accounted for 83 of Houston's 255 yards rushing, most of it in the second half.
A week after letting a 17-point halftime lead slip away during a 42-38 home loss to Memphis, Houston gave itself a chance by playing solid defense early against a high-powered offense that had scored at least 30 points in a record 24 consecutive games.
USF led 7-0 at halftime, with help from the Cougars turning the ball over on downs at their 37 early in the second quarter.
Darius Tice ran for 18 yards on fourth-and-1 to keep the ensuing drive alive, then scored on fourth-and-goal from the 2.
Houston's defense thwarted two other threats, stopping the Bulls on downs at the Cougars 11 and 27 in the opening half.
Houston: King gave the Cougars a spark offensively, and the defense rebounded after yielding 42 second-half points in last week's loss to Memphis. USF finished with 462 yards total offense, but it wasn't nearly as easy as the numbers suggest.
South Florida: The Bulls, who've won five games by at least 20 points, weren't as sharp as usual, offensively or defensively. But in their first real test of the season, they proved resilient and didn't flinch after Houston tied the score on three different occasions in the second half.
USF slipped one spot in last week's rankings after squandering most of a 27-point lead while holding off Tulane 34-28 on the road. Sputtering against Houston probably ended any hopes the Bulls had of reaching the top 10 this season.
Houston: Returns home to face East Carolina on Nov. 4.
South Florida: at Connecticut on Nov. 4.