Look out, Pac-12, here comes Stanford.

Not too long ago, that would have sounded wacky. But the Cardinal have won five of their past six games, and on Saturday night they walloped UCLA 104-80 before a crowd of 5,418, the largest of the season at Maples Pavilion.

Stanford (14-11, 7-6 Pac-12) completed a sweep of the Los Angeles schools and improved their home record to 9-2 this season. The Cardinal shot 53 percent and had nine dunks, seven by center Josh Sharma.

“Coach (Jerod) Haase’s message from the beginning of the year has always been just keep improving as the season goes on and we’ll be playing our best basketball come February and March,” Sharma said.

“We stuck to that game plan, and we’re continuing on that trend. We have high goals for this team, and we plan on completing those.”

Stanford took control of the game with a 14-0 run in the first half, then opened a 23-point lead in the second half after a 45-minute delay because one of the rims got loose, so both had to be replaced.

“It was another step forward today,” Haase said. “Certainly not a situation where we’ve arrived. … Today our energy was good, and we made shots. When we make shots, the whole dynamic changes.”

Stanford had a balanced attack with 22 points from Sharma, 20 from KZ Okpala, a season-high 19 from freshman Cormac Ryan, 12 from Daejon Davis and 10 from Bryce Wills.

Davis, who also had 11 assists, returned to the lineup after missing two games with what was called an upper-body injury. He was hit in the face during the Oregon State game.

“He’s a big piece of this team,” Ryan said. “Having him back in this way was huge for us.”

Ryan was hitting just 31 percent of his 3-point attempts coming into the game, but he hit his first four tries Saturday night and wound up 5-for-8 from distance.

“Obviously it feels good when the shots are going in,” he said, “but I try to keep that same passion and emotion regardless of whether the shots are going in or not. It was fun to make a run and play well together. Everything was flowing.”

The Bruins cut the lead to 85-76 with just over four minutes left, but that’s as close as they got.

“Defensively, we’ve been pretty decent, but we just didn’t have an answer,” UCLA interim head coach Murry Bartow said. “They killed us in transition, they killed us in the paint, they made a lot of 3s. I give credit to them offensively. They were really superb.”

UCLA dropped to 13-13 overall and 6-7 in the conference.

Jaylen Hands led the Bruins with 29 points and freshman Jules Bernard added 19 points.

The second half was delayed for more than 45 minutes to repair one of the baskets and its backboard.

During the intermission, workers tried unsuccessfully to tighten the rim, so it was decided to replace the whole basket unit with a backboard attached to a floor stanchion. In the interest of fairness, the other basket was replaced with a floor stanchion as well.

Tom FitzGerald is a San Francisco Chronicle staff writer. Email: tfitzgerald@sfchronicle.com Twitter: @tomgfitzgerald