WACO, Texas (AP) -- Kenny Chery had a triple-double, Brady Heslip hit a tying 3-pointer at the buzzer in regulation and Baylor rallied to beat Kansas State 87-73 in two overtimes Saturday night, snapping a four-game home losing streak.
The Bears (16-9, 4-8 Big 12) trailed by 10 with 9 minutes left before rallying to end their longest home skid in nine years.
Baylor's Taurean Prince banked in a tiebreaking 3-pointer in the second overtime, and had a three-point play on a dunk to put Baylor up by 11 with a minute remaining.
Nino Williams had a career-high 20 points for the Wildcats (17-8, 7-5), who lost their fifth straight on the road.
Chery had the sixth triple-double in school history with 20 points and career highs of 12 assists and 10 rebounds.
Marcus Foster, the hot Kansas State freshman playing 200 miles from his Texas home, had 18 points and 10 assists but missed a free throw late in regulation before Heslip's tying shot.
Heslip's swish from well beyond the arc came after a wild sequence of three missed shots before Isaiah Austin came up with a loose ball and passed to Heslip, who let the ball go with the clock inside 2 seconds.
Heslip was 0 of 6 and the Bears were two of 20 from 3-point range before his tying shot.
Cory Jefferson had 21 points and 11 rebounds for Baylor before fouling out on a play that led to the tying free throw from Foster in the first overtime.
The Bears held for the last shot after Foster's free throw made it 68-all, but Chery missed a jumper.
Prince put Baylor ahead for good early in the second overtime when his 3-pointer from the right wing with the shot clock about to expire banked in. After Williams lost the ball near midcourt, Heslip drove for a layup and a five-point lead.
Will Spradling later hit a 3-pointer to get Kansas State within four, but the Bears ran off eight straight points to put the game away. Prince had five of those points, and Chery the other three.
The Wildcats were coming off consecutive wins over ranked opponents, including an upset of No. 7 Kansas, and led by 10 in both halves before Baylor rallied.
Isaiah Austin had 18 points and a career-high nine blocks, including two to start the second half that sparked an 8-0 run to get Baylor within a point after the Bears scored a season-low 21 in the first half and trailed by nine.
The Bears were down 10 again before Chery finished a 10-0 run with consecutive layups for a 51-all tie.