LOS ANGELES (AP) — USC needed only one game to equal its entire conference win total from last season, when it started out 0-8 in the Pac-12.

Jio Fontan scored 15 points, including a pair of tiebreaking free throws with 6.9 seconds to play, and USC pulled out a 71-69 victory over Stanford on Thursday night in the conference opener for both schools.

"It was just a matter of staying locked in and trying to stay confident," said Fontan, who just as easily could have been describing his team's stubbornness down the stretch at both ends of the court. "You just have to keep playing. It's a long game. We knew we were going to continue to get possessions if we played well defensively. We knew that if we just stuck to the game plan, eventually we were going to wear on them."

Eric Wise added 14 points for USC (6-8). Four of the Trojans' losses have come against schools that are currently among the top 20 in the nation including Minnesota, Illinois, San Diego State and New Mexico.

"That's a tough USC team, and people forget they probably had one of the toughest schedules coming into the conference. So we expected a heck of a fight, and it was that type of game," Stanford coach Johnny Dawkins said. "I don't think we can forget about this game, but we know we have to move on. It's a long race, and this is one game. We know there's some tough lessons we can learn from this game and that will help us improve."

Fontan, who sprained his left thumb in the first half of USC's 63-61 overtime win over Dayton on Sunday, shot 5 for 12 from the field.

The Trojans finished last season with a school-record 26 losses and were 1-17 in the conference. The only victory came against Utah in the first intra-conference meeting with the Utes after the Pac-10 expanded to 12 schools.

USC hadn't beaten a traditional Pac-10 opponent since March 10, 2011, when they beat California 70-56 a couple of miles up Figueroa Street at Staples Center in the opening round of the conference tournament.

"You've got to get sick of losing at some point," coach Kevin O'Neill said. "You've got to stop worrying about stats. Tonight we looked like we were more worried about winning than losing. You get your tail kicked a few times and it makes you tougher.

"We gave ourselves a chance to win tonight. We played through some adversity down the stretch, which is great. I couldn't ask for more from Jio. I thought he controlled the game completely down the stretch. It was a great win for our team. Every night you play it's going to be a challenge, and playing hard can get you through a lot of things."

Andy Brown had 17 points for Stanford (9-5). The Cardinal finished last season 10-8 in the Pac-12 and 26-11 overall, ending their season with a 75-51 victory in the championship game of the NIT Tournament against Minnesota. But they haven't qualified for the NCAA Tournament since 2008.

In the preseason Pac-12 media poll, Stanford was picked to finish fourth behind Arizona, UCLA and California. USC was picked ninth.

The Trojans never led until Aaron Fuller's lay-up with 8:51 left in the game, which capped a 10-0 run and put USC ahead 53-51. He started the play by blocking a shot by Josh Huestis at the other end. Huestis finished with 10 points and 12 rebounds.

During the rally, USC guard Byron Wesley left the court holding his stomach with both hands and went to the dressing room after cramping up. He returned to the bench with 4:46 left and the Trojans down 62-59, but did not play again. The Trojans kept battling and took a 69-67 lead on two free throws by Fontan with 1:51 to play.

Brown tied it with a lay-up, but couldn't convert the 3-point play with 26.8 seconds left. Stanford's Chasson Randle, who missed all six shots, fouled Fontan coming out of a USC timeout, and the Trojans' point guard made both. Stanford had one more chance, but Randle missed a running jumper and Dwight Powell bounded a dunk attempted off the rim as time expired.

'The guy missed a dunk. Let's face it, that should have been a tie game. But that's basketball," O'Neill said.

Stanford shot 51.7 percent in the first half and going 7 for 13 from 3-point range en route to a 42-33 lead at intermission. Brown led the way with 13 points, including three buckets from behind the arc.

"We only made two in the second half, but that's not what we do, anyway," Dawkins said. "We want to be a team that plays off Dwight (Powell). But they did do a better job of finding us out there, and give them credit for that.

"We anticipated that USC would come out heavy in the second half, and we talked about that at halftime," Dawkins added. "But they just kept fighting and were able to stay in there and made the plays at the end. They did a terrific job defensively and they won a hard-fought game."

Wise, who missed the final 10 1/2 minutes of USC's 63-61 overtime victory last Sunday at Galen Center after getting his second technical foul of the game, had 10 points during a 4:46 span to help them trim a seven-point deficit to 30-29. But the Cardinal finished the half with a 12-4 run, capped by Aaron Bright's buzzer-beating jumper. This was the first time in nine games this season that the Trojans won when trailing at halftime.

"I think he's a good player and he does a great job," Dawkins said. "He's strong, he's very versatile and probably one of the most efficient players in our conference — maybe even in the country."

The Cardinal captured both games against The Trojans in 2011-2012, Stanford's first season sweep of USC since 2005. They won 51-43 at home on New Year's Eve and 59-47 in the rematch on Feb. 12 at Los Angeles, ending Stanford's six-game road losing streak at USC with some clutch 3-point shooting by Randle down the stretch and a 45-19 rebounding advantage.

Stanford will remain in town for Saturday's matinee at UCLA. The Cardinal have won only nine of their last 37 conference games on the road.