MANHATTAN, Kan. (AP) — Ochai Agbaji hit a baseline jumper with 9 seconds left to lift No. 7 Kansas over Kansas State 78-75.

Agbaji’s shot gave Kansas its first lead since early in the first half and snapped K-State’s two-game winning streak against ranked foes. Agbaji scored 29 points.

Jalen Wilson added 16 points for Kansas, and Christian Braun and David McCormack with 11 each. Kansas State wasted a career-high 35 points by Nijel Pack.

Markquis Nowell had 16 and Selton Miguel added 11.

Kansas made just 15 of 22 free throws in the second half but was saved by a 45-23 rebounding advantage.