Chasson Randle called Marcus Allen a spark plug for the team, and on Sunday, he showed why.
Randle scored 17 points, Stefan Nastic added 15 and Anthony Brown and Rosco Allen added 11 points apiece for the Cardinal (16-7, 7-4 Pac-12), who ended a two-game losing streak.
"It kind of just happens," Marcus Allen said. "I try to pick everybody up on defense and get them energized. I try to do the small things that don't show up on the stat sheet."
Katin Reinhardt scored 19 points and Jordan McLaughlin added 18 for the Trojans (9-14, 1-10), who lost their eighth straight.
"I thought it was a really good college basketball game," USC Coach Andy Enfield said. "In transition, we had a wide-open layup with about 2:30 left, but our player [Reinhardt] had his knee give out on him. We had a two-on-zero break, and we didn't get any points out of it. If you look at a couple of crucial plays in the game, that's the difference."
An offense goal-tending call on a Nastic basket gave Stanford a 65-59 edge with 3:31 left to play and the Trojans never got closer than four the rest of the way.
"Marcus does one thing one night and something different the next night," Stanford Coach Johnny Dawkins said. "If he can put it all together, he's capable of having a great career here."
The Cardinal opened the second half with a 13-4 run to wipe out a six-point halftime deficit. An offense rebound led to Randle's lean-in jumper with 13:53 remaining that put Stanford ahead.
"I'm impressed with the win," Randle said. "They gave us everything they had and we had to give them everything we had."
Marcus Allen's lay-up with 6:28 left in the first half to put Stanford ahead, 27-20. The Trojans outscored the Cardinal 19-6 the rest of the way to take a 39-33 advantage into intermission.
"We need everybody," Dawkins said. "Losing two in a row was a difficult pill to swallow. We had to figure out a way to get back on track."
USC post player Nikola Jovanovic was limited to 18 minutes because of foul trouble. The Cardinal took advantage with a 50-35 rebounding edge.
"It was huge for us," Dawkins said. "He can really cause problems. Him getting in foul trouble was tough for them but fortunate for us. Stefan was able to finish in there."