CHAMPAIGN, Ill. — For the first time this year, the University of Wisconsin football team’s defense couldn’t come up with the crucial stop that it needed.

A pair of fourth-quarter turnovers by the Badgers allowed Illinois to cut into a pair of two-score leads. The second of which, an interception of Jack Coan, set the Fighting Illini up with a chance at a major upset, and they converted on that chance. James McCourt kicked a 39-yard field goal as time expired, giving the Illini a 24-23 win over No. 6 Wisconsin at Memorial Stadium.

Senior outside linebacker Zack Baun, one of the Badgers’ leaders and top defenders, said the loss came down to execution and energy. Senior inside linebacker Chris Orr said he agreed that the Badgers didn’t start the game with the same energy they've had throughout the year, and despite having it in spurts, couldn’t sustain it.

“It was just a roller-coaster of emotions all game. We just had to keep battling and they ended up outdoing us,” Orr said.

The loss snapped UW’s streak of nine straight wins against the Illini, and derailed Badgers’ (6-1, 3-1 Big Ten) hopes for a showdown of undefeated teams between UW and No. 4 Ohio State (7-0, 4-0) next Saturday in Columbus.

Things started to unravel for UW late in the third quarter.

Illinois put together a six-play scoring drive, capped by Reggie Corbin’s gallop of 43 yards right through the heart of UW’s defense. That put Illinois within 20-14, and brought to life a Homecoming crowd of 37,363 people that were expecting a runaway from the Badgers, who were 31-point favorites before kickoff.

UW looked to have the answer to that score. Coan, UW’s junior quarterback, hit receiver Kendric Pryor on a short slant and he took it 35 yards down to the Fighting Illini’s 3. The tackle by Illinois safety Devon Witherspoon turned out to be a four-point play.

The Badgers netted 2 yards on three runs after Pryor’s catch and were forced to kick a field goal. Collin Larsh made the 20-yard kick, but not scoring a touchdown in that situation proved costly. UW came into the game scoring touchdowns on 21 of 26 red-zone chances, but went 2 of 5 against the Illini.

“Those are plays we have to make. Those are times where you must get in the end zone,” said junior tailback Jonathan Taylor, who had 132 yards and a touchdown on 28 carries. “They did a good job making plays … getting off blocks.

“There were some times where there were guys one-on-one with guys, and you’ve got to make them miss. Everybody else is blocked up, and it’s up to you to get that man in front of you.”

The Badgers looked poised to salt away a victory after going up 23-14 and the defense getting a stop on fourth-and-1 midway through the fourth quarter. But three plays into UW’s drive, Taylor was stripped by Illinois’ Jake Hansen, and Isaiah Gay pounced on the ball for Illinois.

The Fighting Illini used that momentum and struck for another touchdown in four plays. Josh Imatorbhebhe hauled in a 29-yard pass on a post route, shielding off Rachad Wildgoose at the goal line to score, to bring the Illini within 23-21.

The Badgers took over with 5 minutes, 53 seconds remaining, and got a first down on a Coan pass to Jake Ferguson, who had a touchdown in the first quarter. Facing a third-and-5, Coan targeted Ferguson again on a corner route, a play that had been successful throughout the afternoon. But Illinois cornerback Tony Adams made a leaping interception to give Illinois the ball at its 47 with 2:32 remaining.

Illinois quarterback Brandon Peters — making his return from injury after missing last week’s loss to Michigan — hit Daniel Barker to convert a third down, and then Dre Brown knifed through UW’s defense for a 13-yard run that turned out to be a back-breaker. Brown broke a number of tackles on the run, as UW defenders tried to go for the strip as opposed to the tackle.

UW’s defense had done well through the first six games not allowing big plays, but the Illini found creases and took advantage for large chunks of yards.

“They did a good job of it. Some opportunities where we had a guy there and we don’t finish on the tackle,” UW coach Paul Chryst said. “We didn’t make enough of those plays in different areas to win the game. We’ve got to be better.”

Illinois coach Lovie Smith called the win the “signature win” of his four-year tenure with the team, and said he believes it’s a sign of where his program is.

“I think when you see what is happening and see how close we are. People tend to forget, we dominated Michigan for a period of time, we had a 14-point lead against Nebraska,” Smith said. “We are a little bit closer than people give us credit for. Now it is about stacking them, we got one big win but now it is about getting two in a row.”

A number of Badgers said the locker room was quiet after the heartbreaking loss. Fighting Illini fans stormed the field after picking up their first win over a ranked opponent since 2011.

With the battle with the Buckeyes — who ran through Northwestern 52-3 on Friday — looming, Coan said he believes in the team’s ability to recover.

“You have to make big plays when you need big plays, and you have to finish plays when they’re there,” Coan said. “We have a great group of guys who are all brothers. We’re going to come together and I’m really confident we’re going to respond well.”