KANSAS CITY, Mo. — The Kansas State Wildcats rallied from down 10 in the second half to take down Texas 78-74 in the second round of the Big 12 Men’s Basketball Tournament.

The 10-seed Wildcats will take on 2-seed Iowa State at 6 p.m. on Thursday.

Texas raced out to a 9-2 lead with the Wildcats picking up three fouls in the first five minutes.

A 7-0 run led by five Tylor Perry points tied the game at nine with Kansas State continuing their run to take a 16-12 lead with 12:50 to go in the first half.

The Longhorns then went on a 14-0 six-minute run to take a 26-14 lead. KSU worked its way back to a single-digit lead with baskets from Will Mcnair Jr., RJ Jones and Perry.

After getting the deficit to as low as four with less than four minutes to go, Texas increased their lead to 37-27 with 1:26 to go in the first half and KSU’s deficit stayed at 10 going into halftime down 39-29.

At one point during the half, K-State was shooting 29.4% from the field but ended the half shooting 37.5% from the field, 42.9% from three and 72.7% from the free throw line.

Texas shot 57.1% from the field, 25% from three and 56% from the charity stripe.

Perry, McNair and Arthur Kaluma all tallied two fouls in the first half.

The Wildcats opened the second half with a 7-0 run led by two Kaluma layups to cut UT’s lead to 39-36.

Texas kept the lead until 12:32 to go when Perry hit a big deep three to give KSU a 48-47 lead and a bucket in the paint from David N’Guessan helped answer a Max Abmas layup to give the Cats a 50-49 lead with 11:49 to go.

A 10-4 run extended KSU’s lead to 60-53 exlamated with a Perry three with 8:23 to go.

K-State got their lead to as much as 10 by the 4:28 mark.

But the Longhorns stayed around and used a 9-2 run to only be down 69-66 with 1:25 to go.

N’Guessan made one of two free throws and Texas responded with a Dylan Disu putback to cut the lead to 70-68 with 28 seconds to go. K-State head coach Jerome Tang called a timeout with 22 seconds left in the game.

Perry drained two free throws after a Chendall Weaver flagrant foul and Cam Carter broke away from coverage on the inbound pass to put home a layup with 18 seconds to go.

Abmas responded with a three with 14 seconds left to make it 74-71.

Another intentional foul allowed Perry to drain two more free throws before Abmas hit another three to make it 76-74 with eight seconds left.

Carter splashed both free throws home for a 78-74 lead with seven seconds left.

KSU finished the game shooting 47.2% from the field, 38.5% from three and 74.2% from the free throw line while holding Texas to 42.4% from the field, 26.1% from three and 75% from the free throw line.

Five Wildcats scored in the double digits: Perry (21), Kaluma (14p, eight rebounds), N’Guessan (13), Carter (10p, seven rebounds) and Dai Dai Ames (10).

Perry’s 12 second-half points were a huge boost to KSU along with Kaluma’s 12 second-half points.