SAN JOSE, Calif. (AP) — Noah Baumann drained 8 of 12 from long range and scored 26 points to lead San Jose State to its first victory in over two months, knocking off New Mexico 89-82 on Tuesday night to halt a 17-game losing streak and pick up its first Mountain West Conference win this season.

The Spartans (4-23, 1-14) had not posted a victory since beating Northern Arizona 79-74 on Dec. 15.

Michael Steadman made 10 of 20 field-goal attempts to post 21 points while pulling down 11 rebounds. Zach Chappell chipped in 17 points to go with nine assists for San Diego State.

The Spartans knocked down 11 of 22 from beyond the arc and were 31 of 64 from the floor (48 percent) while limiting New Mexico to 33-of-82 shooting (39 percent).

Keith McGee came off the bench to score 25 points for New Mexico (11-16, 5-10). Carlton Bragg added 17 points while pulling down 16 rebounds.

The Spartans took a 47-46 lead into the break. They never trailed in the second half, pushing their advantage to 65-52 early in the final period.