Duncan Ferguson suffered his first defeat as Everton's interim manager as Leicester City booked their place in the EFL Cup semi-finals with a 4-2 penalty shoot-out victory at Goodison Park.
Carlo Ancelotti is reportedly close to taking over at Everton, who had beat Chelsea and drawn with Manchester United under Ferguson, whose side fought back from 2-0 down to draw 2-2 in normal time to set up penalties.
After quickfire goals from James Maddison and Jonny Evans had put Leicester in control, Everton rallied through Tom Davies and Leighton Baines' stoppage-time stunner.
But Baines could not repeat his heroics from the spot as he, along with Cenk Tosun, failed to beat Kasper Schmeichel - the Premier League's leading scorer Jamie Vardy ensuring Leicester's place in the last four.
Despite a shaky start, Leicester took the lead when Maddison sent a fine, outside-of-the-boot finish arrowing into the bottom-left corner in the 26th minute.
It was 2-0 three minutes later - Evans getting the better of Michael Keane to nudge home Vardy's flick-on from Maddison's corner, though Yerry Mina should have pulled one back soon after.
With Moise Kean, who was brought on from the bench and then taken off after 19 minutes at Old Trafford on Sunday, having been introduced for the hosts, Ayoze Perez went close with a rasping strike which Jordan Pickford did well to keep out.
Mina missed another glorious chance prior to the hour, failing to make contact with a free header yards from Schmeichel's goal, before Pickford denied Dennis Praet and Marc Albrighton hit the crossbar.
Everton made their good fortune count - Davies volleying in to keep their chances alive, setting the stage for Baines to pick out the top-left corner from long range in the 91st minute.
But it was not to be for Everton, with Schmeichel making two successive saves from Baines and Tosun before Vardy slammed home the winning spot-kick.
What does it mean? Big Dunc bounce comes to an end
Ferguson has injected a fresh sense of vigour and intensity into Everton's injury-hit squad, but their passion and discipline ultimately fell just short against Brendan Rodgers' flying Foxes, who are into their first EFL Cup semi-final since 1999-2000.
Though Ancelotti - should he indeed be appointed - has plenty to work on, if he can replicate the intensity Everton have shown under Ferguson, there is a good platform on which to build.
Rodgers' remarkable cup run rolls on
Leicester's boss was sacked by Liverpool after his last trip to Goodison Park, following a 1-1 Merseyside derby draw in October 2015.
But Rodgers has bounced back and, with Wednesday's victory, has now progressed from 29 successive domestic cup ties across his spells with Liverpool, Celtic and Leicester.
From hero to shootout zero for Baines
Making his first start of the season in place of the injured Lucas Digne, 35-year-old Baines gave a timely reminder of his quality with his audacious stoppage-time strike, only for the usually clinical full-back to then fluff his lines from the spot.
Key Opta Facts
- Baines scored his first goal for the Toffees since November 2017 against Crystal Palace, 760 days ago.
- Maddison has been directly involved in nine goals in his last eight appearances in the League Cup (four goals, five assists), scoring in all three games this season.
- Leicester's second goal scored by Evans was their 50th in all competitions this season, becoming the sixth Premier League team to reach that tally (also Man City, Liverpool, Chelsea, Spurs and Wolves).
- Vardy has been directly involved in 30 goals in his 29 appearances under Brendan Rodgers in all competitions for Leicester City (25 goals, 5 assists).
Arsenal visit Goodison Park on Saturday, though it is not yet clear just who will be in charge of Everton for that fixture. Leicester, meanwhile, have two crunch games over Christmas - first against Manchester City, before they face league leaders Liverpool on Boxing Day.