ORLANDO, Fla. - Stanford fell behind early and dropped its second straight game, falling to No. 17 UCF 45-27 on Saturday afternoon.
Freshman Dillon Gabriel threw for 347 yards and four touchdowns in his second college start, and UCF scored at least 30 points for the 29th consecutive game -- the longest streak in the Football Bowl Subdivision since 1936.
The Cardinal (1-2, 0-1 Pac-12) trailed 38-7 at halftime and struggled offensively against the Knights (3-0, 0-0 American), which scored on six of their first seven possessions.
Gabriel completed 22 of 30 passes, including TD throws of 28 yards to Marlon Williams, 38 yards to Tre Nixon, 38 yards to Gabriel Davis and 1-yard to Jake Hescook.
Greg McCrae rushed for 109 yards and one touchdown for UCF, which has won 25 consecutive regular-season games and 28 of 29 overall since the start of 2017.
K.J. Costello returned to Stanford's lineup after sitting out against USC with a head injury and completed 21 of 44 passes for 199 yards, one touchdown and an interception that led to one UCF score.
Austin Jones had a 35-yard TD run and finished with 65 yards rushing on seven carries for the Cardinal, while Costello's 24-yard TD pass to Michael Wilson trimmed the Cardinal's halftime deficit to 38-17 early in the fourth quarter.
Stanford, which outscored the Knights 20-7 in the second half, rounded out its scoring with a 35-yard field goal from Jet Toner and Jonathan McGill's 28-yard fumble return for a touchdown with 1:41 remaining.
Stanford played a regular season game in Florida for the first time. It was the fourth appearance in the Sunshine State all-time. The Cardinal played Clemson in the 1986 Gator Bowl, Penn State in the 1993 Blockbuster Bowl and Virginia Tech in the 2011 Orange Bowl.
Stanford returns home to face No. 15 Oregon next Saturday at 4 p.m.