USC nearly did it.

Ethan Anderson steadied an offense that was erratic and wayward in the first half. Isaiah Mobley asserted himself and made just about every correct play when presented with them over the final 20 minutes. Reese Dixon-Waters had a mini-breakout. Drew Peterson closed the gap and then almost won it.

The seventh-seeded USC Trojans fell to 10-seed Miami Friday afternoon 68-66. The Trojans were down double-digits in the first half, then rallied early in the second half to claw back into the game. A runner with a defender hanging on him from Peterson with 14 seconds left tied the game at 66-all.

Then Miami was awarded two free throws with three seconds left.

Charlie Moore (who finished with 16 points) knocked them both down.

That was the difference.

To be at that moment, though, so close right at the end, deserves some recognition. USC looked woeful to open the game.

The Trojans fell down by as many as 13 points with 3:05 to play in the first half. It turned the ball over 12 times in the first 20 minutes and shot 29.6% from the field. Down just 11 points, though, felt like a small win. They weren’t out of the game. Miami couldn’t knock down shots either.

But they trapped everything USC tried to do. Perimeter Trojans couldn’t beat guys off the dribble with any kind of frequency. When they could, they passed out of shots and gave the ball away. They looked dead-set on making the extra pass even if it wasn’t the right pass.

That changed in the second half.

A key reason why: head coach Andy Enfield opted to insert Anderson and Dixon-Waters into the second-half starting lineup over Boogie Ellis and Max Agbonkpolo. Ellis was 1-for-6 from the field, including 1-for-4 from 3 with three turnovers. Agbonkpolo had four turnovers in 13 minutes.

SC was outscored by seven with Ellis on the floor. In Agbonkpolo’s 13 minutes, USC was outscored by 12. In Anderson’s 30 minutes, the Trojans outscored the ‘Canes by 10.

Anderson calmed the waters in the halfcourt. When Miami brought the trap off the pick-and-roll, he consistently found Mobley with timely passes. Mobley would then make the correct read.

When the help defender rotated, Mobley kicked to the corner for 3s. When they left him alone, Mobley knocked down a pair of triples. When they gave him a lane, he drove.

Mobley finished with 11 points and eight assists. At halftime, he was scoreless with just two assists and two turnovers.

Dixon-Waters was excellent, giving USC exactly what it lacked early. When he was swung the ball, he was decisive. USC opened the second half on a 17-2 run to take a four-point lead with 14:44 to play. It was back-and-forth the rest of the way.

As the clock ticked under a minute, Miami matched two empty USC possessions with a big-time bucket over two contests from Kameron McGusty (12 points) and a pair of free throws to go up by seven.

With 35 seconds left, Peterson drilled a left-wing triple off the feed from Anderson to bring USC within four. On the ensuing inbounds, USC was able to trap Moore in the corner and force a turnover.

Then Peterson, who was 5-for-12 shooting until the final minute, came off a screen on the right wing and drilled another.

One-point game.

Miami would split a pair of free throws on its next possession, opening the door for the Trojans to tie it with a 2. It was Peterson again that USC called on, and Peterson again came through with the runner in the lane.

Miami elected to play it out. Moore drove. Anderson contested down low as Chevez Goodwin rose to swat a would-be game-winner away.

Anderson was called for a foul after contacting Moore’s forearm.

USC had one last chance with three seconds left and no timeouts. Peterson reached mid-court and rose to fire.

And he was inches away from sending USC through.

USC faithful will likely take exception with the late foul that sent Moore to the line.

Enfield and his team will lament what if? But they should be proud, at least, of the fight exhibited over the final 20 minutes. After Miami shot 45% in the first half, USC limited it to 40% in the second half. The turnovers fell away down the stretch.

“Proud of our team,” Enfield said. “We came up a possession short today.”

The loss brings USC’s season to a close. The Trojans finish at 26-8, with the 26 wins tying a program record for a single season.