TUCSON, Ariz. (AP) -- The Stanford Cardinal thought they were reliving a nightmare.
Two days after blowing a comfortable lead in an overtime loss at Arizona State, the Cardinal watched Arizona erase an eight-point deficit in the final 4:23.
This time the Cardinal recovered.
Brook Lopez scored 23 points, including the winning free throw with 18 seconds to play, as No. 7 Stanford held off the Wildcats 67-66 on Saturday.
"There was a sense of deja vu, but we weren't going to let that happen," said Brook Lopez's twin brother Robin, who added 14 points. "We didn't want to make the same mistake two games in a row."
Stanford (21-4, 10-3 Pac-10) bounced back from a tough overtime loss at Arizona State that ended less than 39 hours before tipoff at McKale Center. In Tempe, the Cardinal led by 15 points with 7:59 to play and seven with 1:49 to go before losing in overtime.
"Thursday was a tough loss, considering we had a nine-point lead with 'X' amount of time on the clock," Stanford coach Trent Johnson said. "For them to bounce back against a team this talented and this well-coached is really good for us."
On Saturday, the Cardinal used their size advantage to take command of the game midway through the second half, and the Wildcats seemingly had no answer for the 7-foot Lopez twins after starting center Jordan Hill fouled out with 5:27 to play. Stanford outrebounded Arizona 40-26.
"It's hard for us to guard them with our frontline guys," Arizona interim coach Kevin O'Neill said. "They are big, agile and hard to guard. They're both going to be NBA players."
Bayless scored 31 points, his third straight game over 30. In his previous two games, Bayless scored 39 against Arizona State and 33 against California.
The freshman from Phoenix scored 16 straight points in the second half to keep the Wildcats close. He hit 7-of-18 shots from the floor and all 16 of his free throws -- a school single-game record for free-throw percentage.
"At the end of the game, I started making plays," Bayless said.
Trailing 62-54 with 4:23 to play, the Wildcats scored nine straight points to take a 63-62 lead on Budinger's free throw with 2:03 remaining.
Brook Lopez tied it with a free throw and then hit a 2-footer to put the Cardinal up 65-63 with a minute to go. Sixteen seconds later, Budinger responded with a 3-pointer from the top of the key to give the Wildcats a one-point lead.
After Brook Lopez hit two free throws with 18 seconds to go, Budinger missed a running 5-footer in the final seconds. Robin Lopez said he got a piece of the ball with "the top inch of, I think, my middle finger."
Budinger looked as if he wanted a goaltending call, but after the game he said he wasn't sure if Robin Lopez had touched the ball on its way down.
"It's a tough one," said Budinger, who had 23 points. "During the moment, I thought I had it over him, and he kind of goaltended. But I'm not really sure. I've got to go look on film to see if he really did or not."
Robin Lopez had three blocked shots, but courtside statisticians said they did not credit him with a block on the final play.
The ball fell to the floor, and the Cardinal batted it out to midcourt as the horn sounded. The relieved Cardinal exchanged congratulations as the disgusted McKale Center crowd jeered.
"I'm pleased with how we didn't give up there at the end," Johnson said. "I felt we battled the entire game."
Afterward, some of the Wildcats fumed about the officiating.
"We are on our homecourt, and it seemed like we could not get a call," Bayless said. "It seemed like everything was going their way."
But O'Neill refused to make excuses for his team's third loss in four games.
"The only thing I told our guys is final score," O'Neill said. "It does not matter what the officials do, and it doesn't matter what the crowd does. We are one point shy of them at the end of the game. I told the guys I was extremely proud of their effort."