LOS ANGELES (Ticker) -- The other Los Angeles school sprang its own upset at the Pac-10 Conference tournament.
Desmon Farmer scored 24 points and Roydell Smiley added a career-high 20 as Southern California withstood a wild finish and advanced to the semifinals with a 79-74 victory over 14th-ranked Stanford.
UCLA sent shockwaves through the college basketball world when the eighth-seeded Bruins knocked off top-ranked Arizona earlier Thursday. USC (12-16) pulled off a bit of a milder surprise by ousting the second-seeded Cardinal.
"I think everybody in this tournament has something to play for," USC coach Henry Bibby said. "I don't think Arizona came over just for the (heck) of it, nor did Stanford or Arizona State. Stanford was in it to win, and that's the way it should be."
The Trojans led by as many as 14 points in the second half, but the Cardinal forged a last-ditch rally. Matt Lottich's 3-pointer sliced the deficit to 77-74 for Stanford (23-8), which got back the ball after USC's Errick Craven missed a contested layup.
Lottich misfired on a hurried 3-pointer with 27 seconds left, but the Cardinal caught another break when Craven missed a pair of free throws two seconds later. Nick Robinson fed Josh Childress for a wide-open 3-pointer, but Childress missed and Robinson came up empty on his follow shot.
Craven went back to the line with nine seconds left and missed his first attempt before draining the second. USC's Robert Hutchinson added a foul shot for the final margin.
"We didn't play well until the last 10 minutes of the game and we didn't come out with a lot of energy, and it really showed out there," Lottich said. "We were able to get back in it, but they made some free throws down the stretch, which really won the game for them."
Farmer actually felt Bibby contributed to USC's nerves down the stretch.
"We were thinking (to) pick it up," Farmer said. "Coach was calling timeouts for no reason, so in the huddles, we told each other to bring the intensity up on the court."
The Trojans will meet California in Friday's semifinals. The third-seeded Golden Bears were the only higher seeded team to win in the quarterfinals.
Stanford grabbed an early 10-4 lead before USC took control, going ahead for good on Farmer's 3-pointer that made it 21-20. The Trojans closed the half with a 12-2 burst that featured 10 points from Rory O'Neil for a 39-28 advantage.
"USC played better than we did, they competed better than we did," Stanford coach Mike Montgomery said. "They were clearly the aggressor, they hurt us on the boards and we got ourselves into too big of a hole that we could dig ourselves out of."
Two free throws by Farmer established the Trojans' largest cushion at 56-42 with 11:13 remaining.
Julius Barnes led a second-half charge with nine points in an 11-4 surge that pulled Stanford within 68-62.
Lottich made a free throw with just over three minutes left and missed the second. But the rebound was tipped right back to him and he nailed a jumper to cut the Cardinal's deficit to 73-71.
Stanford missed a chance to tie when Justin Davis missed a short shot. The Cardinal got the offensive rebound and threw it out to Barnes, who missed a 3-pointer that would have given them the lead.
After a free throw by Gregg Guenther Jr. made it a three-point game, Farmer came up with a key assist when he found O'Neil in the corner for a 3-pointer that beat the shot clock for a 77-71 advantage with 74 seconds left. It was the Trojans' first basket in nearly four minutes.
"On my 3-pointer, Desmon hit me in the corner, so I knocked the shot down before the shot clock hit zero," O'Neil said.
O'Neil netted 17 points and Craven scored nine for USC, which overcame 32 percent (9-of-32) shooting. Smiley's effort off the bench was welcome and surprising, considering the junior guard managed just 14 in his previous three games.
Barnes scored 18 points and Childress netted 15 to lead Stanford, which lost for just the second time in nine games. Davis fouled out with 15 points and 11 rebounds.
The Cardinal shot just 23 percent (7-of-30) from beyond the arc and also were ineffective at the line, going 11-of-18.
USC lost both regular-season meetings with Stanford. The Trojans won all three meetings last season, including a 103-78 rout in the Pac-10 quarterfinals.