Thomas Gipson scored eight of his 14 points in the game's decisive minutes and freshman Marcus Foster also had 14 points as Kansas State outlasted No. 21 Gonzaga 72-62 on Saturday at Intrust Bank Arena.
Wesley Iwundu scored 13 points for the Wildcats (8-3) while Shane Southwell had 11.
Kevin Pangos had 14 points for Gonzaga (10-2) while reserve Drew Barham added 13 and David Stockton and Przemek Karnowski both scored 10.
The Bulldogs entered the game averaging 87.5 points and had not scored fewer than 68 this season.
Gonzaga played the second half without second-leading scorer Sam Dower, who took a hard fall late in the first half and did not return.
Southwell scored five straight points to give Kansas State a 33-24 lead with 18:46 to play.
Then Foster, among the top 10 scorers in the Big 12, went on a personal 7-3 run with a 3-pointer, layup and monster dunk over Stockton. The Wildcats led 40-32 and the crowd was buzzing.
But a 3-pointer by Gary Bell Jr. capped a 7-0 Gonzaga run that pulled the Bulldogs within 40-39 with 14:48 to play.
The teams exchanged the lead for 6 minutes before K-State finally managed to pull away behind Gipson. Twice the 6-foot-7 Gipson posted up the tiring Karnowski, a 7-footer forced into extended minutes by Dower's injury, for baskets.
The second one gave Kansas State a 60-54 lead with 3:39 remaining. Karnowski entered the game averaging 23 minutes but played 30 Saturday, 17 in the second half.
Gipson's putback with 1:59 to play pushed the lead to eight, and the Wildcats could milk out the victory.
Gonzaga, among the top 20 nationally in scoring, had real difficulties finding its offense in the first half.
The Bulldogs had just 19 points in the game's first 17 minutes and trailed by five.
But Kyle Dranginis followed a driving layup with a 3-pointer, making the score 24-24 with 1:49 remaining in the half.
Kansas State scored the half's final five points on a 3 by Nigel Johnson and a layup by Nino Williams for a 29-24 lead. Gonzaga had not scored fewer than 31 points in a first half this season.