SANTA BARBARA, Calif. — Max Heidegger scored 30 and kept UC Santa Barbara close enough to sneak past Prairie View A&M in the final minutes 69-66 on Friday night.

Gabe Vincent gave UC Santa Barbara (4-2) the lead for good at 66-65 with a pair of free throws at 2:37 and the Gauchos hit 3 of 6 free throws from there to hold on for the win. Prairie View (2-4) missed its final six field-goal attempts and five of its last six foul shots but still had a 3-point attempt that would have tied it at the buzzer.

UCSB trailed 50-48 near the midpoint of the second half and Heidegger scored 12 of the Gauchos’ next 18 points during a seven-minute stretch that ended with Vincent’s go-ahead free throws.

Leland King II had 15 points and 13 rebounds and Vincent added 11 points for the Gauchos.

Gary Blackston had 21 points, Zachary Hamilton scored 19, and JD Wallace had eight points and 14 boards for the Panthers.