Terrell Gomez scored 20 points and No. 19 San Diego State beat Wyoming 69-66 on Thursday to advance to the Mountain West Conference Tournament semifinals.

The Cowboys had a chance to tie it at the buzzer, but Marcus Williams’ long 3-pointer missed badly.

Jordan Schakel and Trey Pulliam each scored 15 points for the Aztecs (21-4), who will play either Boise State or Nevada on Friday.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Xavier DuSell led Wyoming (14-11) with 21 points. Williams and Hunter Maldonado each scored 12, while Graham Ike added 10 points and nine rebounds.

Trailing 49-46 midway through the second half, the eighth-seeded Cowboys used five consecutive 3-pointers to stay within reach of top-seeded San Diego State, which hit six straight free throws down the stretch.

The Cowboys, who employ a four-guard lineup to push the tempo, scored a tournament-record 59 first-half points in their first-round win over San Jose State behind 64.7% shooting. Knowing Wyoming’s tendency to fire from long range — it attempted 70 3-pointers combined in two regular-season meetings — the Aztecs used a full-court press and limited the Cowboys’ space at the perimeter.

Despite the effective defensive game plan, Wyoming finished the first half 10 of 22 from the floor, including 5 of 11 from 3-point range. There were 11 ties and four lead changes in the first half.

San Diego State hit 13 of 24 (54.2%) from the floor in the first half, but was off the mark from 3-point range, making 3 of 11 (27.3%).

CLICK HERE TO GET THE FOX NEWS APP

BIG PICTURE:

Wyoming: The Cowboys finished the tournament 23 of 52 (44.2%) from 3-point range after hitting 11 of 27 on Wednesday against San Jose State and 12 of 25 against San Diego State. Wyoming’s 48% shooting from long range was the highest percentage allowed by the Aztecs all season.

San Diego State: The Aztecs are staring at an eight or nine seed for the NCAA Tournament at this point, but are hoping to move up to as high as a six seed if they can win the Mountain West tourney.

UP NEXT

Wyoming: Season is likely over.

San Diego State: Awaits the Nevada-Boise State winner.