LAS VEGAS – Joel Ayayi seemingly is always ready when his team needs him.

Gonzaga needed him Monday night, and he delivered.

Ayayi scored 12 of his 14 points in the second half and the No. 2-ranked Zags survived a scare to beat San Francisco 81-77 in the West Coast Conference tournament semifinals.

“I don’t think I flipped the switch,” Ayayi said. “Just trying to make the plays when the team needs me. Whenever I have the ball and need to make a play on the clock, I have to make a play and I’m just trying to do my best.”

The redshirt sophomore from Bordeaux, France, snapped a 69-69 tie with 4:14 left with a jumper, and hit a midrange shot on the team’s next possession to give Gonzaga a 73-69 lead. Ayayi scored eight of Gonzaga’s points during a 9-3 run.

The Zags (30-2) will play Saint Mary’s in Tuesday’s championship game.

Jordan Ford, who scored 18 points, made a pull-up jumper with 1.4 seconds left as Saint Mary’s edged No. 14 Brigham Young 51-50 in the late semifinal.

This will be Gonzaga’s 23rd consecutive WCC final and it will seek its 17th championship.

“We’ve had some incredible streaks at Gonzaga,” coach Mark Few said. “The fact that we can come down here, fight our tails off against a really good San Francisco team, knowing that we’re playing onward, shows toughness and substance from our guys.”

Gonzaga has a 44-5 WCC tournament record under Few.

Killian Tillie had 19 points and 10 rebounds, and Ryan Woolridge had 16 points on 7-of-11 shooting to pace Gonzaga, which improved to 12-0 all time in tournament openers in Las Vegas.

Charles Minlend scored 19 points, one of four players in double figures for the Dons (22-12). Khalil Shabazz, a former standout at Rainier Beach High in Seattle, added 17 points.

San Francisco had a 12-2 run in the first half and tied it at 25-25 on Remu Raitanen’s three-pointer with 6:29 left in the second quarter.

The Dons defeated Loyola Marymount and Pacific to reach the semis.

“Playing the No. 2 team in the country, third time this year where we’ve had really good efforts against them,” USF coach Todd Golden said, “and I think it sets us up really nicely for the NIT.”

The Dons led 54-53 with 11:50 remaining on a three-point play from Minlend.

“I think we stuck with what we wanted to do,” Minlend said. “We just missed some shots that normally go in.”