SEATTLE — Stanford held USC to a season-low 27 percent shooting from the field Friday night, and the Trojans made just 3 of 18 three-pointers.

Still, it was a tight game with under five minutes left. But Alanna Smith converted a three-point play and DiJonai Carrington hit two big foul shots as the second-seeded Cardinal fended off the seventh-seeded Trojans 69-59 in the quarterfinals of the Pac-12 women’s tournament.

Stanford head coach Tara VanDerveer credited the “Ki and Di Show”: Freshman Kiana Williams scored a team-high 18 points and sophomore DiJonai Carrington added 13, including a half-court shot that banked in for a three-pointer.

In Saturday’s 8:30 p.m. semifinal, the No. 16 Cardinal will play sixth-seeded Arizona State, which advanced by beating third-seeded Oregon State 57-51.

“We didn’t keep (the Trojans) off the line,” VanDerveer said, alluding to USC’s 26-for-29 foul shooting performance. “I thought our defense was good except for our fouling. We allowed them to rest when they had basically five players.”

VanDerveer praised USC’s defense, especially the air-tight guarding by Aliyah Mazyck on Brittany McPhee, who was held to seven points, her second lowest total of the season.

“She’s very aggressive and athletic, with quick hands,” VanDerveer said of Mazyck. “She worked really hard against Brit. She’s an outstanding defensive player.”

McPhee agreed. “She’s really good on the ball, with pressure and presence,” she said. “And they do a good job swarming when you try to drive.”

VanDerveer also said her team didn’t run its offense well.

Point guard Marta Sniezek’s eight points led Stanford (21-9) to a 21-9 first-quarter lead. Sniezek later ran into foul trouble and finished with 10 points and five assists.

Smith, who had 14 points, figured in a strange, foul-plagued sequence in the fourth quarter. She picked up her fourth foul and departed with 8:49 left. Then Kaylee Johnson committed her third and fourth fouls in quick succession and also went to the bench, and Sniezek committed her fourth moments later and briefly went to the bench, too.

Mazyck, despite making just 1 of 9 three-point tries, scored a game-high 22 points. Minyon Moore, a Salesian-Richmond alum, had 12 points and Jordan Adams 10.

“They shot the ball a lot better than us (43 percent), and that was the difference,” USC head coach Mark Trakh said. “When we got down early, our kids could have quit and said we’re going to get blown out tonight. Nobody’s blown them out all year.

“We’re undersized, we don’t have a lot of depth, but they don’t quit.”

The Trojans (20-11) are oping to get into the NCAA Tournament. “I think we’re one of the top 64 teams,” Trakh said. “Our RPI is good, our strength of schedule is good, our record is good.”

Cardinal reserve Alyssa Jerome hit a three from the corner at the buzzer ending the third quarter, opening a 52-39 lead. Nevertheless, Stanford couldn’t relax until the closing seconds.

“They’re one of the most athletic teams in the Pac-12,” Johnson said of USC. “We knew the biggest thing was going to be taking care of the ball. We knew it was going to be a tough game.’’

It was Stanford’s third win over USC. The others were by seven and four points.

Tom FitzGerald is a San Francisco Chronicle staff writer.

Pac-12 tournament

Saturday’s semifinals

6 p.m.: Oregon (28-4)

vs. UCLA (24-6)

8:30 p.m.: Stanford (21-9)

vs. Arizona State (21-11)