PITTSBURGH (AP) Pittsburgh offensive coordinator Mark Whipple installed the play he dubbed ''Pitt Special'' during the second week of training camp.

Whipple had his first-stringers run it once against the starting defense and it worked. So he made sure the Panthers practiced it during Thursday walkthroughs and tucked it in his back pocket just in case.

Just in case arrived late Saturday afternoon with Pitt trailing 15th-ranked UCF by six and a minute to go. Facing fourth-and-2 at the UCF 3, an official came over and told Whipple the Panthers could still get a first down if they got to the 1.

''Nah, we're going to score,'' Whipple said.

In way that could prove to be the turning point in Pitt's season. UCF's, too.

Running back A.J. Davis took a direct snap from center, ran to his left and flipped the ball to Aaron Mathews, who was heading right. Matthews, a former high school quarterback, thought he might have to make a run at the pylon. When two UCF defenders closed in, Mathews pulled up and found quarterback Kenny Pickett in the end zone, giving the Panthers a euphoric 35-34 victory.

''Kenny claims he has the best hands on the team,'' Mathews said with a smile. ''He's one for one.''

One very big one.

On a day Pickett threw for 224 yards and a score and added 61 on the ground despite exiting for a couple of series late in the third quarter after bruising his right (throwing) shoulder, his heady decision to find a spot in the UCF zone defense and wait for the ball ended UCF's 25-game regular-season winning streak.

UCF had won 27 of its last 28 overall, including the Knights' American Athletic Conference championship game victories the last two years along with their Fiesta Bowl loss to LSU last year.

The play borrowed heavily from the ''Philly Special'' run by the Philadelphia Eagles in their Super Bowl win over the New England Patriots two seasons ago. The Panthers put their own spin on it. While Eagles quarterback Nick Foles was wide open in the end zone, Pickett's job was more complicated. He faked a block and then turned into a tight end while waiting for Mathews to find him.

''We were all pumped up about (the call),'' Pickett said. ''I know Aaron was. I have a touchdown catch before him. He was a little (ticked) off about that. We switched roles for a play.''

KNIGHTS STOPPED

UCF (3-1), which hadn't lost since a non-bowl game or conference championship game since falling to South Florida in November 2016, had one last-gasp drive but went nowhere. The Panthers sacked true freshman quarterback Gabriel Dillon twice to deal the Knights' shot of earning a spot in a New Year's Six bowl as the nation's top Group of Five team a serious blow.

''I just think that we did some things - coaches and players - that you can't do on the road if you want to beat a good football team,'' UCF coach Josh Heupel said. ''This one is going to hurt for a while, but we'll get back on Monday and get back after it.''

Dillon passed for 338 yards and two touchdowns but also threw his first two interceptions of the season. Gabriel Davis hauled in 10 passe for 151 yards and two scores, but the Knights' high-tempo offense didn't run as efficiently as it had during three blowouts to start the year.

UCF finished with 423 yards, 180 under its season average. Dillon was sacked six times in all and the Knights were unable to finish off Pitt despite a 31-point outburst spanning the second and third quarters that turned a 21-point deficit into a 10-point lead.

''Give credit to Pitt,'' Heupel said. ''They played a good game and found a way to be plus-one on the scoreboard. I'm proud of the way our kids competed and played.''

Trailing by three touchdowns for the first time since a blowout loss to Michigan in 2016, UCF responded emphatically, with a little help from the Panthers.

Davis fumbled deep in Panther territory with 5:41 left in the first half. Adrian Killins scored four plays later and UCF was off and running. Gabriel found Gabe Davis for two third-quarter touchdowns sandwiched around an 87-yard punt return for a score by Otis Anderson, who broke several tackles while racing down the left sideline to the end zone.

Yet Pitt rallied. The Panthers were coming off an emotional seven-point loss to rival Penn State last week, a defeat in which head coach Pat Narduzzi took significant heat for opting to kick a field goal deep in Penn State territory in the final minutes instead of trying to go for a game-tying score.

Backup quarterback Nick Patti threw his first touchdown while Pickett tested out his injured shoulder and when the defense forced UCF to settle for a field goal with 4:36 left to keep the game within reach, Pickett guided Pitt 79 yards in 12 plays, the last three coming on a reception that UCF didn't see coming.

''You guys always want me to go for it on fourth down,'' Narduzzi said. ''We may never punt again ... That's a big-time victory.''

POLL IMPLICATIONS

Expect UCF to fall behind No. 20 Boise State in the polls and lose the inside track on being the Group of Five representative in a New Year's Six bowl.

THE TAKEAWAY

UCF: Gabriel should have a stranglehold on the starting job even with Darriel Mack Jr. on the way back from an ankle injury suffered in July. Notre Dame transfer Brandon Wimbush figures to be out of the picture completely. He played just one snap, getting tackled for a loss in the first quarter.

Pitt: The Panthers face an uphill climb in the ACC's Coastal Division after opening the season with a loss to No. 21 Virginia, but Pitt could be a handful once conference play starts in earnest next month. The secondary plays with swagger and Pickett is becoming more comfortable by the week in Whipple's system.

UP NEXT

UCF: Hosts UConn in its American Athletic Conference opener next Saturday night.

Pitt: Finishes up nonconference play by hosting Football Championship Subdivision opponent Delaware next Saturday.

---

More AP college football: https://apnews.com/Collegefootball and https://twitter.com/AP-Top25

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.