PITTSBURGH (AP) Miami head coach Manny Diaz kept telling quarterback Jarren Williams to be ready. That at some point the Hurricanes would need him even though Diaz awarded the starting job to N'Kosi Perry.

Whether Williams initially bought in to whatever Diaz was selling him is up for debate. Neither Williams nor Diaz declined to get into specifics when asked if Williams missed practice in the days ahead of Saturday's visit to Pittsburgh.

''On the internal stuff, that's not something I get into,'' Diaz said. ''I don't talk about stuff like that.''

Besides, it doesn't matter now anyway. Consider Williams all in. Let him offer his play during Miami's game-winning drive in Pittsburgh on Saturday as proof. Thrust into the lineup midway through the fourth quarter after Perry struggled, Williams led the Hurricanes on a 62-yard drive in the final minutes, the last 32 yards coming on a catch-and-run by wide receiver KJ Osborn with 58 seconds remaining that gave Miami a 16-12 victory.

''I said, `Hey, it's time for me to come and step up,''' Williams said. ''The guys need me. The team needs me. This program needs me. I'm going to give everybody everything I've got.''

Miami (4-4, 2-3 Atlantic Coast Conference) needed everything Williams had after coming in for Perry, who completed 10 of 24 passes for 104 yards and an interception. Diaz inserted Williams into the lineup after Alex Kessman's fourth field goal gave the Panthers (5-3, 3-2) a 12-10 lead. Miami went three-and-out on Williams' first possession. On his second, he directed a drive the Hurricanes hope alters the course of their wildly uneven season.

Williams completed a short pass to Osborn on fourth down at the Miami 47 to keep Miami alive. He later scrambled for a first down that pushed the ball to the Pitt 32. Two snaps later he connected with Osborn, who did most of the work while shedding a pair of defenders on his way to the end zone.

''It was crunch time,'' Osborn said. ''I braced myself and bounced off some guys. Once I was running, I was happy.''

And Miami was finally in control. Pitt didn't go anywhere on its final drive, done in by a pair of drops, a sack and a fourth-down heave by Kenny Pickett heave that sailed wide of intended receiver V'Lique Carter. Pickett finished 18 of 32 for 146 yards with the two picks as the Panthers saw their four-game winning streak end on a day they limited Miami to 208 total yards.

''The defense played well enough to win except for that last play,'' Pitt head coach Pat Narduzzi said. ''I think we probably gave up one big play the entire game, which doesn't happen very often, but it was the one play that they needed to put the game away, and we just didn't make enough plays period.''

And too many turnovers. The Panthers gave it away three times in the opening 16 minutes, two of them coming on interceptions by Miami cornerback DJ Ivey, the other on a fumble by Pitt wide receiver Taysir Mack. Cam'Ron Harris, starting for injured starter DeeJay Dallas, ran for 60 yards for the Hurricanes, including a 1-yard dive in the second quarter after Ivey's second pick gave the Hurricanes the ball at the Pitt 17.

Still, an early 10-3 lead wouldn't hold, forcing Diaz to turn to Williams in the fourth quarter with the game - and perhaps the season - in the balance. After some initial missteps, Williams delivered, though Diaz isn't exactly in a hurry to name a starter for next week's visit to rival Florida State.

''As for what this means tomorrow or the next day, I'll deal with that tomorrow,'' Diaz said.

DEJA VU

Last month, Pitt opted to attempt a field goal rather than go for it on fourth-and-goal at the Penn State 1 while trailing by a touchdown. Kessman missed and the Panthers lost. Trailing by a point and with the ball at the Miami 1, Narduzzi again opted to kick, this time intentionally taking a delay of game to give Kessman a better angle to kick. He made it to put the Panthers in front and Pitt's defense held on Miami's next possession before faltering late.

Ultimately, Narduzzi believes he made the right call.

''When you're down, three points puts you ahead and your defense is playing -- I don't know. Again, could go either way,'' Narduzzi said. ''It's just got to play the odds, and I guessed wrong, so it's my fault.''

THE TAKEAWAY

Miami: The Hurricanes still have plenty of questions on offense but at least they have some momentum after coming out on the wrong end of a series of narrow losses in recent weeks.

Pitt: The Panthers have thrived in tight games this year - they came in having won four straight by a combined 10 points - but couldn't get the one stop they needed and will need considerable help if they want to win the ACC Coastal Division for the second straight year.

UP NEXT

Miami: Visits longtime rival Florida State next Saturday. The Hurricanes have won two straight in the series, including a 24-20 victory in Tallahassee in 2017.

Pitt: Travels to Georgia Tech next Saturday. The teams have split their six meetings since the Panthers joined the ACC in 2013.

---

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.