It had to sweat bullets there at the end, but USC survived.

The third-seeded Trojans overcame 23 turnovers—17 of them in the second half and several under their own basket with less than a minute to play—to beat the sixth-seeded Washington Huskies 65-61 and advance to the semis of the Pac-12 Tournament.

USC trailed for most of the final 10 minutes of the first half and by as many as eight points early on in the second half. But an 11-2 run over a four-minute stretch brought things close to level. We rode the seesaw the rest of the way as the game featured 15 lead changes in total and seven ties.

Coming down the stretch, Washington looked more and more gassed. The Huskies played Wednesday night, an 82-70 win over Utah. The Trojans were off for the tournament’s opening round. As chaos ensued over the closing minutes, USC made mental mistakes that kept Washington in the game but Washington looked too spent to capitalize.

The Pac-12’s leading scorer, Terrell Brown Jr. at over 21 a game, had 21 points on 13 shots at the halftime break. He was on absolute fire, shooting the Huskies ahead and hitting circus shots through contact at the rim.

USC tried to hedge ball screens hard in the game’s first 20 minutes. Brown beat Trojan defenders around the corner or just rejected the screen altogether and got to his left.

In the second half, the Trojans switched coverages and started trapping him in the screen-and-roll game. Brown missed 11 of his 12 shots in the final 20 minutes, scoring just two points.

On the Huskies’ penultimate possession, with the Trojans up just two points, it was Brown who had the ball in his hands, matched up on USC forward Isaiah Mobley on the perimeter. Brown drove from the left side of the floor to the rim and tried to reverse up and under on the right side. Mobley knocked it away but Washington retained possession.

Next it was Emmitt Matthews Jr.’s turn to try Mobley, but again the Trojan big man walled up at the rim and forced a miss.

Reese Dixon-Waters sank a pair of free throws at the other end to secure the win.

And while the turnovers will draw most of the attention from USC in the game’s aftermath, it was the defense that deserves the credit.

USC held Washington to 31% shooting for the game and just 24% in the second half. Washington was just 2-for-8 on its 3-pointers. Matthews scored 12, but on 3-of-10 shooting. Jamal Bey had 10, but took 10 shots to get there. Brown finished with 23 points on 25 shots.

How do you win with 20-plus turnovers? Wall up on defense. Washington only had 16 points off the Trojans’ giveaways.

Offensively, USC’s primary shooter, Drew Peterson, struggled. He finished with only nine points on seven shots. The guard was never quite able to find his rhythm. Fortunately for USC, Boogie Ellis regained his. After a prolonged slump from the floor, Ellis led the way with 17 points on 6-of-10 shooting. He attacked and got himself to the free throw line, making timely buckets and carrying the SC offense when it needed someone to be assertive.

Mobley had his usual fingerprints-all-over kind of game, with nine points, nine boards, and six assists, though he did have five turnovers.

The win, USC’s 26th of the season, tied a program record for victories in a single season. The Trojans will play 2-seed UCLA next with a trip to the Pac-12 Tournament final on the line. Tip-off in that game is set for Friday at 8:30 p.m. PT on FS1.