SAN DIEGO -- It wasn't until Nelson Agholor knocked down a desperation pass by Nebraska's Tommy Armstrong Jr. inside the 10 that USC coach Steve Sarkisian could exhale and celebrate.
After blowing most of an 18-point, third-quarter lead, the No. 24 Trojans beat Nebraska 45-42 in a wild National University Holiday Bowl on Saturday night.
"Nelson made a heck of a play to go attack the football," first-year coach Sarkisian said. "You can only get burned so many times, I guess. Let's just get the ball on the ground. And that's kind of what I was hoping for."
Cody Kessler completed 23 of 39 passes for 321 yards and three touchdowns for USC (9-4), which was playing Nebraska (9-4) in a bowl game for the first time.
Adoree' Jackson scored on a 98-yard kickoff return and a 71-yard pass from Kessler. Javorius Allengained 152 yards on 26 carries and scored on runs of 2 and 44 yards.
"We've been through a lot this year," Sarkisian said. "We've had a couple of just excruciating losses, and to come out tonight and win at the very end, we always try to make it exciting. We make it entertaining for everybody."
The most painful loss for USC this season came when Arizona State's Jaelen Strong caught Mike Bercovici's 46-yard desperation pass for a touchdown as time expired to give the Sun Devils a 38-34 victory in Los Angeles on Oct. 4. Three weeks later, Utah scored with eight seconds left to beat the Trojans 24-21 in Salt Lake City.
"I'm happy for these guys," Sarkisian said. "They work every day. That to me is a really cool sign of the character on this team of where we're headed and what we're doing, that we have people in our organization that work. As hard as it can get, as tough as it gets, we're at our best. That to me is just awesome.
"Our future is ridiculously bright."
The Trojans took a 45-27 lead when Kessler threw a 20-yard scoring pass to Bryce Dixon with 2:03 left in the third quarter.
Armstrong brought the Huskers back with a 65-yard touchdown pass to Jordan Westerkamp with 24 seconds left in the third quarter and then a 15-yard keeper with 6:52 left in the game. His 2-point conversion pass to Kenny Bell pulled Nebraska to 45-42.
USC held De'Mornay Pierson-El to a 1-yard gain on a pass from Armstrong on fourth-and-3 from the USC 31 with 2 1/2 minutes left.
"The idea was we were going to go for it because we were just outside the envelope for our kicker," interim coach Barney Cotton said. "I'm glad that we had the opportunity to go for it at the end. We were probably 3 or 4 yards beyond where we needed to be for our kicker."
Nebraska fired coach Bo Pelini on Nov. 30. New coach Mike Riley watched from a skybox.
Armstrong completed 32 of 51 passes for 381 yards and three TDs, with one interception.
"In a close game, you have to respond and show up and do things the right way. I think that's what I did after the second quarter," he said.
USC had 515 yards of total offense, and Nebraska finished with 525.
Kessler tied the USC single-season record of 39 touchdown passes set by Matt Barkley in 2011.
Kessler had no idea he tied the record.
"That is completely irrelevant to me," Kessler said. "I'm not just saying that. I really do mean it. I've always put the team before me."
After Nebraska's Drew Brown kicked a 34-yard field goal early in the first quarter, Jackson caught the kickoff at the 2 and ran it up the right sideline for the longest kickoff return in Holiday Bowl history.
His 71-yard TD on a catch-and-run came on the first play from scrimmage after Nebraska punted on its first possession of the second half. He caught a short pass from Kessler and weaved through defenders to give USC a 31-17 lead.
"They were everything we thought they would be," Cotton said. "They were physical, they were very skilled. They have a big-play offense. I thought it was a good battle out there. It could've gone either way at the end."