SEATTLE — It was a game of inches. Not surprisingly, Rick Pitino and a couple of his scrappy guards got it done for Louisville.

Freshman Quentin Snider made the winning free throws Friday, and Terry Rozier closed it out with a steal, helping the fourth-seeded Cardinals to a 57-55 victory over 13th-seeded UC Irvine and the tallest player in the tournament, 7-foot-6 Mamadou Ndiaye.

“He looked 8 feet to me,” said Pitino, whose team moves on to play Northern Iowa on Sunday for a trip to the Sweet 16.

With the game tied, Snider snagged a rebound in the corner off a long miss by Luke Nelson and drew a foul when Will Davis II crashed into him.

Snider made the free throws with 8.9 seconds left, and the Anteaters (21-13) never got a final shot, thanks to Rozier’s pick of Alex Young.

“These two guys had to make big, tremendous plays,” Pitino said.

Putting Snider on the hot seat wasn’t really the coach’s plan when the freshman replaced Chris Jones in the starting lineup last month after the Cardinals (25-8) dismissed the senior guard. Pitino told his team there was no way Snider could replace Jones all by himself, and asked the rest of the guys to pick things up.

But in this game, Snider elevated his game. He finished with a career-high 16 points, 13 higher than his average — and scored the winning points. For a kid who grew up in Louisville and participated in Pitino’s youth camps as a kid, it was one memorable performance.

“I just got up to the line and just shot it,” Snider said. “I knew my team needed these points, so I just knocked them down.”

Wayne Blackshear led the Cardinals with 19 points.

Ndiaye finished with 12 points and five rebounds for the Anteaters, and he generated most of the buzz.

Every time the sophomore out of Senegal touched the ball, a roar went through the crowd. Ndiaye was a force through much of the second half. Twice, he gathered the ball in the post, palmed it like a tennis ball and slammed it through the hoop without leaving his feet.

On the other end, he blocked one shot, altered about a dozen more and forced Louisville, a team without much outside shooting, to take its chances from the perimeter.

But with the game on the line in the last two minutes, he didn’t touch the ball. And when the big fella got his fourth foul with 2:26 left, it cost UC Irvine.

Trailing 55-53, Blackshear took the ball straight at Ndiaye, who didn’t contest it much, and hit a short shot over him to tie it with 42 seconds left.

“Tricky,” Blackshear called it.