Updated

Kansas City, MO (SportsNetwork.com) - Melvin Ejim had 24 points, 10 rebounds and two blocks in the 16th-ranked Iowa State Cyclones' 91-85 victory over the Kansas State Wildcats in the quarterfinals of the Big 12 Tournament.

Dustin Hogue added 19 points, 10 boards and two steals for the Cyclones (24-7), who will face 10th-ranked Kansas in the semifinals on Friday. Georges Niang tallied 18 points and seven rebounds.

"I just think that we were just being aggressive," Hogue said. "They're a really good team. They go kind of small with their guards, their four-man stretch on the floor, so they kind of match us real well. I think in the long run we just made key stops and we was able to hit shots down the stretch."

Marcus Foster ended with 21 points for the Wildcats (20-12). Shane Southwell donated 19 points and seven boards and Nigel Johnson added 17 points.

Foster made a 3-pointer with 1:04 remaining to pull Kansas State within 87-85. The Wildcats had a chance to tie the game or take the lead after Ejim missed a jumper, but Hogue stole the ball from Southwell.

Naz Long made two free throws with 16.2 seconds left to give the Cyclones an 89-85 edge. Foster missed a shot from beyond the arc at the other end, and Long scored a layup in transition to secure the win for Iowa State.

"I guess an entertaining game," Kansas State coach Bruce Weber said. "I'm not sure we guarded as well -- I know we didn't guard as well as we needed to. I asked the guys to just compete and play."

Earlier, the Cyclones used a 6-0 spurt late in the first half to create some distance. Ejim's layup with 1:39 left made it a 44-36 contest.

Southwell responded with a layup and Foster connected from beyond the arc to get Kansas State within 44-41 at the break.

The second half was a back-and-forth battle that came down to the final minutes. With the score tied at 78, Long bookended a 7-2 Iowa State spurt with a 3-pointer and a layup.

Game Notes

The teams split two games in the regular season, with each squad winning on its home floor. Kansas State leads the all-time series by a 135-83 count ... Long and DeAndre Kane had 14 and 11 points, respectively, for Iowa State ... Thomas Gipson tallied 13 points for Kansas State, which shot 54.5 percent from the floor.