Updated

Freshman Tony Snell scored a career-high 16 points and had a strong defensive effort in the first half against BYU All-American Jimmer Fredette, helping New Mexico beat the No. 9 Cougars 86-77 on Saturday.

Kendall Williams, another New Mexico freshman, also had 16 points while Drew Gordon scored 15, Dairese Gary had 14 and Phillip McDonald 11 for the Lobos (14-8, 3-4 Mountain West), who ended BYU's 10-game winning streak three days after the Cougars knocked off No. 4 San Diego State.

Fredette finished with 32 points after a 12 of 26 shooting effort that included 6-of-9 from 3-point range. But Snell, a rangy 6-foot-7 shooting guard, kept Fredette off his game and held the BYU standout to five points through the game's first 17 minutes.

Brandon Davies scored 15 and Noah Hartsock had 10 for the Cougars (20-2, 6-1).

New Mexico's fans were charged up for BYU's final visit to The Pit for the foreseeable future, now that the Cougars are leaving the Mountain West next season.

They were able to enjoy this one by rushing the court afterward, capping a raucous afternoon at The Pit. It was the highest ranked team the Lobos took out since a 77-74 win over No. 3 Utah in 1998. It also marked the first time New Mexico has won three straight over BYU in 11 years.

The Cougars had everything in control after Fredette's 3-pointer pushed their lead to 53-40 with 14:36 remaining but the Lobos charged back with a 10-0 run, fueled by an aggressive defense.

During that burst, Fredette was mugged on a drive to the basket but New Mexico came away with the ball and Gary, who moments earlier had scored inside, swished a 3-pointer to make it 53-48. Then Gary found Chad Adams for a layup that cut the margin to 53-50 with 12:02 to go.

Snell scored on a reverse layup to make it 53-52 at the 11:21 mark. It was close until the Lobos took a 70-67 lead with 4:50 to play after the New Mexico freshmen got hot — Williams and Snell each made a 3-pointer and Williams added a driving layup.

Fredette was as entertaining as ever, but his shooting touch started to evaporate, and the Lobos weren't finished. Snell hit two 3-pointers to cap a 10-3 burst over the next three minutes to put New Mexico up 80-70 with 2:02 to go.

Fredette came in leading the nation with a 27.4-point scoring average, and he was fresh off a 43-point effort in BYU's huge win over San Diego State this week.

In his previous four games, in fact, Fredette had averaged an astonishing 38.2 points while shooting 54.8 percent from 3-point range.

This time, it took 17 minutes for Fredette to find a rhythm. With New Mexico fans booing every time he touched the ball and Snell waving his long arms, Fredette made just two of his first five shots until he scored seven straight over a 1-minute span late in the first half.

Still, the Cougars led 36-32 at the break, aided by eight New Mexico turnovers.