EL PASO, Texas — With all of the struggles it had on offense, it was a wonder that Stanford was able to hold off Pittsburgh for a 14-13 victory in the Sun Bowl.

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 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 under 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.

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.

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.

The Cardinal won for the first time this season without forcing a turnover. Stanford had been 0-4 in such games.