Pitt had an advantage in nearly every statistical category Monday. The Panthers had more yards (344-208), first downs (18-12), rushes and yards (42-208, 34-103), passing yards (136-105) and third-down conversions (5-1). And Stanford was playing without five starters -- star tailback Bryce Love, receiver Trent Irwin, tight end Kaden Smith, left tackle Walker Little and right guard Nate Herbig.
Finally, Pitt's defense was stingy. Stanford quarterback K.J. Costello saw a streak of 16 games with a TD pass end, and the Cardinal was 1 of 10 on third downs.
"Pitt's a very physical football team with two outstanding runners," Stanford head coach David Shaw said. "As indicative of our entire season, we had more guys get banged up and guys stepped up and played. Thankfully, guys didn't stay out very long. Guys were able to come back in and make plays and keep fighting. Can't say enough about the heart of some of our older guys."
Even the game-winning score was ugly -- the Panthers had stopped Costello on a first-and-goal from the 2-yard line and forced a fumble, which tailback Cameron Scarlett recovered in the end zone.
Scarlett carried 22 times for 94 yards, including another score on a 1-yard run, to earn game MVP honors while filling in for Love.
Love decided to skip it to rehab an ankle injury ahead of the NFL draft, becoming the second Stanford back to do that in the past three Sun Bowls. In 2016, Christian McCaffrey skipped the game, was drafted eighth overall by Carolina and just finished sixth in the NFL in rushing in his second season.
And just as Love kick-started his career with that opportunity, Scarlett gave himself a similar boost.
Of the game-winning score, Scarlett joked, "Just like we drew it up. I was fortunate enough to carry out the fake and look back and the ball was in my hands."
Pitt drove into position for a 55-yard field goal try on the ensuing possession, but Alex Kessman's try was no good.
The Panthers still weren't sure how to explain it all afterward.
"It doesn't add up how that score's 14-13," Pitt head coach Pat Narduzzi said. "Offensively, defensively we outplayed them. We just didn't win on the scoreboard."
The Cardinal (9-4) finished on a four-game winning streak, much the same way they did two years ago when Stanford won the Sun Bowl for a season-ending six-game streak.
"Our defense gave up some yards, but we didn't give up a bunch of TDs," Shaw said. "We made them kick a couple of field goals, and that's the difference in the ball game.
"It's not a beauty contest. It's a football game, and I'm thankful we were able to win it."
The Panthers (7-7) lost their fourth straight bowl game and sixth in the past seven after falling to playoff championship finalist Clemson in the ACC title game. The past three losses have been in four years in under coach Pat Narduzzi.
Pitt, which had a 10-7 halftime lead and was up 13-7 early in the fourth quarter, was led by tailback Darrin Hall, who had 16 carries for 123 yards and a score.
Pitt finished the season on a three-game losing skid, in which the offense never scored more than 13 points. That carried over into Monday's game. Pitt got inside Stanford's 10-yard line twice, and each time settled for field goals. "We get inside the 10 twice and we don't score," quarterback Kenny Pickett said. "We've got to finish drives."
Stanford's offense, which had struggled all day, finally got going in the fourth quarter.
The Cardinal were 0 for 8 on third downs before Costello hit JJ Arcega-Whiteside for a 12-yard completion. A 49-yard pass to Arcega-Whiteside followed, and Scarlett recovered Costello's fumble for the go-ahead score on the next play with 11:28 left.
"They got lucky," Pitt defensive lineman Rashad Weaver said of the fumble, on which Costello was stopped for a loss before fumbling. "They caught a ball that was a fumble."
Stanford: Arcega-Whiteside entered the game needing one touchdown catch to break the school season record of 14 he shared with Hall of Famer James Lofton. But the senior was limited to three catches without a TD. He can play one more year and Stanford, and even though the team said no players declared for the draft Monday, Costello said after the game, "We're losing three of the best receivers in the Pac-12, including Kaden Smith." The Cardinal won for the first time this season without forcing a turnover. Stanford had been 0-4 in such games.
Pittsburgh: The game was the final one for the 1-2 rushing punch of Qadree Ollison and Hall, the first duo in program history with at least 1,000 yards apiece in a season. Ollison, who was injured in the first half and didn't return, had 1,213 yards. Hall finished with 1,144 yards. "It's hard (to see Qadree get hurt)," Hall said. "We feed off each other throughout the game. We're upset. We wanted this one bad."
Stanford: The Cardinal have been able to reload each year under head coach David Shaw, who is 82-26 overall (55-17 Pac-12). Shaw has never won less than eight games in a season, and his Cardinal have played in four Pac-12 title games (3-1). Stanford opens at home against Northwestern on Aug. 31.
Pittsburgh: The Panthers are coming off their first ACC Coastal Division title under Narduzzi, who with 28 wins is second in program history to Jackie Sherrill (39).
More AP college football: www.collegefootball.ap.org and https://twitter.com/AP-Top25
Costello fumbles, and it's somehow caught for a TD
Stanford quarterback K.J. Costello fumbles, the ball pops into the air, and running back Cameron Scarlett catches it for the touchdown.