LAWRENCE, Kan. (AP) Les Miles promised to bring excitement to the perpetually rebuilding football program at Kansas.

The Jayhawks made his debut a little more exciting than he hoped.

After a late fumble in the end zone resulted in a go-ahead touchdown for Indiana State, Carter Stanley calmly led the Jayhawks right back downfield. His 22-yard touchdown throw to Daylon Charlot with 2:20 left in the game allowed Kansas to escape with a 24-17 season-opening victory Saturday.

''I think we'll learn to win games like this without this much drama,'' said Miles, who built Oklahoma State into a winner before leading LSU to a national championship. ''I think we can throw the football to a number of guys and rush the football better and more efficiently than we did today and that would make - might distance ourselves from the opponent.''

There was hardly a speck of daylight between Kansas and Indiana State most of the day.

The Sycamores had clawed back from a 16-3 deficit, taking the lead when Stanley fumbled in the end zone and Inoke Moala recovered it for a touchdown with 4:24 left in the game.

But the Jayhawks' senior quarterback calmly responded to adversity, hitting Andrew Parchment with a couple of passes, finding Charlot for a 26-yard gain then hitting him again for the go-ahead score.

The Jayhawks used an end-around pass to convert the 2-point conversion, then stopped the Sycamores in the closing minutes to avoid losing to their third FCS school in the last five seasons.

''"At the end of the day it's 1-0 and we accomplished our goal this week. Won our game,'' said Stanley, who beat out Thomas MacVittie for the starting job. ''It's going to be the same this week.''

Hasan Defense returned an interception 57 yards for a touchdown for Kansas. Khalil Herbert added 88 yards rushing, and Parchment had eight catches for 121 yards, as the Jayhawks tried to build on some of the excitement that Miles has brought to the program.

It wasn't always pretty for the ''Mad Hatter.''

His kicker, Liam Jones, missed a field goal and extra point. Stanley fumbled a snap on fourth down to spoil another drive. And there were far too many blown assignments on both sides of the ball to think Kansas is much different than its woeful years under Turner Gill, Charlie Weis and David Beaty.

The Sycamores' Ryan Boyle threw for 219 yards with a touchdown, but he also tossed a pair of costly interceptions. Titus McCoy had 88 yards rushing before leaving with a left knee injury.

Still, the Missouri Valley school was in the game in the fourth quarter. Boyle threw a touchdown pass to Dante Jones to get the Sycamores within 16-10 with 10:52 left, and their score on defense gave them hope of their first win over an FBS school in 33 tries.

''We had our chances. Our defense played great,'' Indiana State coach Curt Mallory said.

But it was the Kansas defense, so maligned over the years, that came up with a big stop. It forced Boyle into throwing a fourth-down incompletion with 1:35 left to essentially end the game.

The Sycamores will no doubt rue a couple of missed chances.

They looked as if they might have scored a touchdown just before halftime, but Dante Hendrix had a sliver of his toe out of bounds when he hauled in the catch in the back of the end zone. Boyle also had an interception at the goal line as the Sycamores were about to score.

Throw in Jerry Nunez's two missed field goals and Indiana State made too many mistakes to overcome.

''With a new offense and a new coaching staff on offense, things weren't going to be easy,'' Defense said. ''We're in college so we don't get preseason games to help our offense, and with us being such an older secondary or more mature secondary we already knew how the game was going to go. We just had to play our role and do our part and the offense was going to do their job at the end of the day.''

THE TAKEAWAY

Indiana State: After ripping off five straight wins to end last season, Mallory's bunch carried that momentum into this season. The Sycamores stood toe-to-toe with Kansas all afternoon, and at several points looked to be the better team.

Kansas: The Jayhawks played without running back Pooka Williams, their best playmaker, as he served a one-game suspension for a series of off-the-field incidents. His return next week should give Kansas a big boost of speed and a much-needed offensive lift.

UP NEXT

Indiana State plays its home opener against Dayton next Saturday.

Kansas hosts Coastal Carolina next Saturday in the first meeting between schools.

---

More AP college football: https://apnews.com/Collegefootball and https://twitter.com/AP-Top25

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.