AMES, Iowa (AP) Joel Lanning gave Iowa State and coach Paul Rhoads just the spark they needed.

Lanning threw a touchdown pass in his first start and freshman Mike Warren carved out another 100-yard rushing game, leading Iowa State to a much-needed 24-0 victory over Texas on Saturday night.

Lanning, a sophomore who replaced senior Sam Richardson, struggled at times with his passing but did enough with his feet for the Cyclones (3-5, 2-3 Big 12) to break a three-game losing streak.

More from FoxSports

He led a 66-yard scoring drive that gave the Cyclones a quick early lead and floated a perfectly thrown pass to Dondre Daley in the left corner of the end zone to make it 17-0 in the third quarter. Joshua Thomas plunged in from 1 yard out late in the game to finish off the Longhorns.

Texas (3-5, 2-3) had upset Oklahoma and dominated Kansas State in its two previous outings with an improved running game. But the Longhorns struggled to get anything going in this one and never advanced past the Iowa State 47 until the final 90 seconds.

The victory should ease some of the pressure on Rhoads, whose team won for just the second time in its last 13 Big 12 games. Rhoads shook things up during an eventful week and got the results he wanted.

His promotion of Lanning to the starting job was followed by the departure of offensive coordinator Mark Mangino. Assistant Todd Sturdy took over that job and Rhoads brought former Washington State coach Paul Wulff onto the staff as a volunteer assistant.

Texas didn't have a chance to use its 18-wheeler package for backup quarterback Tyrone Swoopes because the Longhorns never got close to the end zone until a final desperation drive that ended with an incomplete pass on the game's final play. They managed only 119 yards in the first three quarters and were outgained 426-204 for the game.

Warren carried 32 times for 157 yards and a touchdown, the fifth time in the last six games he has run for at least 126. Lanning added 64 yards on the ground and completed 19 of 37 passes for 188 yards, a touchdown and no interceptions.

Lanning helped Iowa State to a 10-0 halftime lead, though it seemed the margin should have been larger. The Cyclones outgained the Longhorns 223-98 and intercepted a pass - and 18 of those Texas yards came on a meaningless play at the end of the half.

But three drives stalled after Iowa State moved into Texas territory - two of them when Lanning was sacked. Still, Lanning helped Iowa State control the ball with his running and scrambling, something that was missing from the offense previously.

He darted out of trouble on third down to keep the Cyclones' first scoring drive alive before completing passes of 17 and 20 yards. Warren took it from there, threading his way into the end zone on a 3-yard run midway through the first quarter.

Iowa State couldn't capitalize on Jordan Harris' leaping interception, but the defense forced a quick three-and-out the next time Texas had the ball. Lanning then got the Cyclones close enough for Cole Netten to kick a 28-yard field goal just before halftime.