SAN FRANCISCO (AP) — Gonzaga got a rare test in conference play just in time for a first-place showdown against Saint Mary’s.

Johnathan Williams scored 17 points and Josh Perkins added 16 to help the 15th ranked Bulldogs to their 18th straight road victory in the West Coast Conference, 75-65 over San Francisco on Saturday night.

After winning the first five conference games by at least 29 points, Gonzaga (16-3, 6-0) had to hold off a late challenge by a San Francisco team missing two injured starters.

“We need to be put in that situation so we can show we can handle it,” Williams said. “We didn’t handle it a couple of times before. It’s good to get a win in a close game.”

Gonzaga had some tight losses during a grueling nonconference schedule, including a two-point defeat at San Diego State and a double-overtime loss to Florida. But things have been easier in the WCC leading into Thursday’s game at home against Saint Mary’s, which has won 12 straight.

The teams are tied for first thanks in part to two key blocked shots late by Rei Hachimura.

“We made enough plays to get the win, which is what this is all about,” coach Mark Few said.

Silas Melson had 14 points and Hachimura added 10 as Gonzaga was held nearly 16 points below the its season average but still managed to win its 12th straight in the series.

Souley Boum scored 22 points and Frankie Ferrari added 18 for the Dons (10-9, 2-4). San Francisco has lost 14 straight games against ranked opponents since beating Gonzaga at home 66-65 on Feb. 12, 2012.

But the Dons kept it close in this one, even if that wasn’t much consolation.

“A loss is a loss,” Ferrari said. “That all is meaningless in a sense. I thought we played well together and our effort was good. But to come up short still feels the same.”

The Dons managed to cut what had been a 12-point deficit in the first half down to five on a 3-pointer by Ferrari early in the second half. But USF them missed seven of its next eight shots from the field as Gonzaga back up to 14 on a 3-pointer by Perkins just past the midpoint of the half.

USF didn’t go away and cut it back to six on a 3-pointer by Jordan Ratinho and had a chance to get even closer but…