CHAMPAIGN, Ill. (AP) Jamal Milan blocked Morgan Hagee's 54-yard field goal attempt as time expired, and Illinois opened its second season under coach Lovie Smith with a 24-21 victory over Ball State on Saturday.

Mike Epstein scored on a 1-yard run with just over two minutes remaining after Mike Dudek returned a punt 52 yards. Isaiah Gay came through with a huge sack near the end, and Milan got a hand on the ball on Hagee's attempt.

Chayce Crouch threw for 145 yards and a touchdown. Mike Epstein ran for two touchdowns.

Illinois - coming off a 3-9 season - blew a nine-point halftime lead and wasted several scoring opportunities down the stretch. But Dudek brought them back into it with a big punt return through the middle and up the right side to the 35 in the closing minutes.

Epstein then plowed in from the 1 with 2:06 left. Crouch converted the 2-point conversion run to make it 24-21.

Ball State then drove to the 30 before Isaiah sacked Riley Neal for a 17-yard loss. The Cardinals had the ball on the 36 with five seconds remaining when they turned to Hagee for the tying attempt.

Neal passed for 204 yards and a touchdown. James Gilbert ran for 74 yards and a touchdown for Ball State.

Illinois took a 16-7 halftime lead, only to give up long touchdown drives on Ball State's first two possessions of the third quarter.

Malik Dunner ran it in from the 3, capping a 75-yard drive. The Cardinals then went 77 yards, with James Gilbert scoring from the 3 to give them a 21-16 lead.

The Illini had a big opportunity late in the third when Tre Watson returned an interception near midfield to the Ball State 33. But with the ball on the 24, Anthony Winbush sacked Crouch on back-to-back plays, forcing Illinois to punt.

Chase McLaughlin missed a 44-yard field goal for Illinois with about nine minutes left and Crouch got intercepted by Bryce Cosby near midfield on the next possession.

THE TAKEAWAY

Ball State: It was a rough finish for the Cardinals, who looked like they might pull this one out. Instead, they opened their second season under Mike Neu with a loss. And Gilbert was helped off the field after his TD run.

Illinois: The Illini have won 20 straight home openers.

UP NEXT

Ball State: The Cardinals open at home next week against UAB, which did not field a team the past two years. Ball State has won seven straight home openers.

Illinois: The schedule isn't getting any easier, with Western Kentucky - an 11-game winner last season - visiting next week. The Illini then go to South Florida on Sept. 15, followed by a home game against Nebraska on Sept. 29 and a trip to on Oct. 7.

Copyright 2017 by STATS. Any commercial use or distribution without the express written consent of STATS is strictly prohibited.