Updated

And just like that, the streak is over.

Riley Grabau scored 17 points, Larry Nance Jr. had 14 and Wyoming beat No. 5 San Diego State 68-62 on Tuesday night to end the Aztecs' run of 20 straight wins, which tied the school record set three years ago.

"We'll come back the next game and we'll be ready to play," coach Steve Fisher said.

While every loss is a "bitter disappointment," it's important that the team learn from it and move on, Fisher said.

The 2010-11 squad is a good example. That group won 20 consecutive games and finished a school-record 34-3 after reaching the Sweet Sixteen for the first time.

These Aztecs (21-2, 10-1 Mountain West Conference) won 20 in a row after losing to Arizona in their second game of the season. Then they ran into pesky Wyoming.

"This is a tough league and you go on the road and it becomes even tougher. And with the win streak we had, I think everybody knows it and everybody talks about they want to be the team to break it and storm the court," Fisher said. "And to Wyoming's credit, they were the ones. They were the ones that did it. They played better and they deserved one."

The victory by Wyoming (15-9, 6-5) came almost 16 years to the day after the Cowboys last beat a top-5 team at home, a 62-56 win over No. 5 Utah. They savored another marquee upset Tuesday as fans rushed the court after the final buzzer, mobbing Wyoming players.

"Their only other loss was to Arizona," Nance said. "I mean, to be in that category is awesome, you know? Fifth-ranked team, the fans storming the court like they did, it was spectacular."

Dwayne Polee II led San Diego State with 15 points, followed by Xavier Thames with 13.

"You've just got to take it as a learning experience," said Thames, who was averaging 18.1 points. "There's a lot of season left, so we can't hang our heads."

Wyoming built a 16-point lead midway through the second half, catching the Aztecs' defense lagging several times. At one point, the Cowboys slammed down four consecutive dunks.

San Diego State mounted a furious comeback, closing within four points with 1:04 left and again with 40 seconds to go on two buckets by Winston Shepard, who finished with 10 points.

But the Aztecs, who were averaging 73.4 points, failed to score again as Wyoming pulled away with free throws in the final 30 seconds.

"I think we'll bounce back," Thames said.

Nathan Sobey and Charlie Hankerson Jr. each had nine points for Wyoming, which used an efficient offense and a stifling defense to stop San Diego State.

The game featured the top two defensive teams in the Mountain West. Entering the game, San Diego State was giving up an average of 56.6 points, while the Cowboys were allowing 60.4.

But it was the Aztecs who had the most trouble making baskets, hitting 38 percent of their field goals and committing 13 turnovers while Wyoming made 58 percent of its attempts from the floor and had 11 turnovers.

The Cowboys took a 32-23 halftime lead, closing out the last 4:20 of the first half with a 10-3 run keyed by two 3-pointers from Grabau.