GLENDALE, Ariz. — Their star guard was outstanding. Their big men dominated inside. Still, it came down to some last-second strategy for the Gonzaga Bulldogs to move on to the NCAA tournament championship game for the first time.

Nigel Williams-Goss scored 23 points, Gonzaga’s big men combined for 27 points and the Bulldogs kept South Carolina from taking a game-tying shot in a 77-73 victory Saturday night in a matchup of first-time Final Four teams.

“Just an awesome, awesome basketball game, with just how hard both teams competed,” Gonzaga Coach Mark Few said. “It took everything we had to hold them off and come back.”

The Bulldogs’ 7-footers, senior Przemek Karnowski and freshman Zach Collins, took care of things on both ends of the court, combining for 18 rebounds. Collins also had a career-high six blocks.

“That’s my job is to go in and rim protect,” said Collins, who had 14 points and 13 rebounds. “I had four fouls today. But I thought, you know, getting those blocked shots would help us.”

Gonzaga (37-1) will face the winner North Carolina or Oregon for the title on Monday night.

“To be playing the last game of the year, that’s crazy cool,” Few said.

With Gonzaga leading 75-72, Williams-Goss missed a shot with 12.7 seconds left and the rebound went out of bounds off Gonzaga, giving South Carolina a chance for a tying 3-pointer. After a timeout, South Carolina passed the ball around and Gonzaga fouled Sindarius Thornwell with 3.5 seconds left.

Thornwell made the first free throw and missed the second on purpose in hopes of his teammates grabbing an offensive rebound. But Killian Tillie rebounded for Gonzaga, was fouled and made two free throws to cement the victory.

“We had been practicing it all year and we always want to foul under six (seconds left),” Few said. “Josh Perkins did a (good) job being really patient and not fouling on the shot. The second part is you’ve got to get the rebound, and that’s what’s been difficult for us at times. They executed great.”

Thornwell said the idea was to get in position for one last quick shot.

“The plan was to miss it left and hopefully Chris (Silva) could tap it out to somebody,” he said.

Williams-Goss, a second-team All-American, led the Bulldogs to a 14-point lead in the second half, but it disappeared quickly as the Gamecocks (26-11) went on a 16-0 run to grab a 67-65 lead with about seven minutes to play.

“When things got tough we banded together and pulled through,” said Williams-Goss, who had six assists and a brief injury scare after turning an ankle underneath the basket.

“There was no way I was going to come out of the game. This is the last two games of the season,” Williams-Goss said. “Now we’re 40 minutes from a championship.”

After South Carolina’s run, Collins and Karnowksi accounted for the next seven points, including a 3-pointer by Collins and a thundering dunk by Karnowski.

South Carolina still wasn’t done. The Gamecocks scored five straight to get within 74-72 with just over two minutes left.

“Since the beginning of the season, that’s what we worked for, moments like this,” Silva said. “And we try to do our best to respond the way we learn how to respond.”

PJ Dozier led the Gamecocks with 17 points. Thornwell, the leading scorer in the NCAA tournament at 25.8 points per game during the first four rounds, finished with 15 points on 4-for-12 shooting after starting slow.

“They just crowd the paint,” Thornwell said. “They forced me to pass it out on my drives (and just protected) the rim real well.”

Karnowski went down on the court in the first half after being poked in the right eye as he took a shot underneath the basket. He left for the last five minutes of the half, but Collins picked him up, scoring eight points in the first half.

“I got blocked, but he just put the finger in my eye,” Karnowski said. “I had blurry vision, a little bit shadow. I couldn’t really open it.”

“Throughout the whole second half it was getting better and better,” he said.