CHAMPAIGN, Ill. (AP) -- The plan was for Wisconsin to roll into a showdown with Ohio State next week unbeaten, with a defense putting up historic numbers and a Heisman Trophy contender at running back.
Illinois had other plans.
James McCourt kicked a 39-yard field as time expired and the Illini pulled off the biggest upset of the college football season, knocking off No. 6 Wisconsin 24-23 on Saturday.
"Our program, we needed to get a signature win. I was just hoping today was the day, and the day came," said Illini coach Lovie Smith, the former Chicago Bears coach who entered the game 11-31 overall and 4-26 in the Big Ten since taking over Illinois in 2016.
"Against the No. 6 team in the country, we played them toe-to-toe," Smith said. "We saw so much fight. We learned an awful lot about ourselves. We're pumped up. One of the best wins we can possibly have at this stage in our program."
Tony Adams picked off a pass by Jack Coan for the Illini (3-4, 1-3 Big Ten), who were 30 1/2-point underdogs, at midfield with 2:33 remaining that set up the winning drive.
Dre Brown's tackle-breaking 13-yard run got Illinois (3-4, 1-3) to the Wisconsin 25 with 34 seconds left and then the Illini set up McCourt to attempt a winner. The junior kicker was down the middle with the field goal to give Smith the most significant victory for Illinois in years.
"No matter if it's an extra point or a game-winner you kind of have to take the approach that every kick is the same because if you take a different approach you might get thrown off or something might be a little different," said McCourt, who missed a 40-yard attempt in the first quarter.
Fans rushed the field when it was over and "Jump Around" -- a signature song at Wisconsin's Camp Randall Stadium -- blared through the speakers at Memorial Stadium.
"It was amazing," Adams said. "It was an amazing feeling."
After the first six weeks of the college football season produced few surprises at the top of the rankings, there have now been major upsets in consecutive weeks. Last week it was then-No. 3 Georgia losing at home to South Carolina in double overtime. Wisconsin becomes the second-highest ranked team to lose to an unranked foe this season.
This was even more stunning.
The Badgers had not trailed this season, allowing only 29 points with four shutouts in six games. Illinois lost to Eastern Michigan earlier this season and has not even been bowl eligible since 2014. Instead, the Badgers (6-1, 4-1) blew a nine-point lead in the final 9:46 of the fourth quarter on Saturday.
Illinois beat a ranked team for the first time since 2011 and knocked off a ranked Big Ten team for the first time since 2007, when the Illini beat No. 1 Ohio State in November on their way to a Rose Bowl appearance. The last time Illinois beat a ranked Big Ten team at home was October 2007, a 31-26 victory against No. 5 Wisconsin.
Heisman contender Jonathan Taylor rushed 28 times for 132 yards and one touchdown for Wisconsin, but he also lost a fumble in Illinois territory in the fourth quarter to help fuel the comeback.
"We had two drives late in the game that ended in turnovers," Wisconsin coach Paul Chryst said. "It's always hard to win on the road, and that made it even harder. We just have to move on and learn from this."
Coan was 24 of 32 passing for 264 yards and a touchdown, but his second turnover of the season came at a crucial time. He sailed a pass on third-and-5 that Adams grabbed to give the Illinois a short field against the No. 1 defense in the nation.
Illinois had cut Wisconsin's lead to 20-14 late in the third quarter on a 43-yard touchdown run by Reggie Corbin.
Wisconsin had opportunities to pad its lead, but settled for a field goal after a first-and-goal from the 3 and then Taylor fumbled at the Illinois 25.
After the fumble, the Illini ripped off a 75-yard touchdown drive, capped by Brandon Peters' 29-yard pass to Josh Imatorbhebhe to make it 23-21 with 5:53 left.
Wisconsin: Put aside the College Football Playoff implications. The Badgers' loss also twists the Big Ten West race, with No. 20 Minnesota, No. 23 Iowa and Wisconsin all yet to play each other.
Illinois: The Illini pulled the stunner despite losing top receiver Ricky Smalling (right leg) early in the game and star defensive end Oluwole Betiku (undisclosed injury) early in the second half. Betiku ranks fourth in the nation in sacks.
Expect the Badgers to take a plunge when the AP Top 25 comes out Sunday.
Wisconsin: The Badgers head to Ohio State for a game that lost a lot of luster in Champaign.
Illinois: The Illini travel to Purdue, trying to make it two straight in the Big Ten.