This was the Europa League version of snakes and ladders for Leicester City, slithering up and down the qualification steps before ultimately crashing out of the competition.

Leicester’s defending has been a headache for Brendan Rodgers this season and it was brutally exposed here as they slipped to a defeat that sentenced them to the Conference League play-offs next year.

On a chaotic night in Naples, which they began as group leaders, Leicester endured a nightmare start, produced a defiant comeback and then conceded a decisive third goal to end in third place.

There was also late drama in the other Group C match, when Legia Warsaw missed an injury-time penalty against Spartak Moscow, which would have enabled Leicester to qualify if it had been converted.

Yet it all feels like a wasted opportunity and, for Rodgers, the season could unravel unless he can find a solution to their shaky defending.

Leicester may have been missing seven players after a coronavirus outbreak, but have not secured a clean sheet in 17 matches. The three goals conceded here were all poor, left-back Ryan Bertrand particularly at fault, and Rodgers was left to reflect on a disappointing night.

“Over the course of the six games we have attacked well but defensively we’ve not been good enough. To concede 11 goals in six is nowhere near our level,” he said.

“When you are conceding like we have been, a bit of panic sets into your defending. You can’t score three or four every game [to win].

“We are so inexperienced in Europe, we’ve got young players who will be better for it, but ultimately we’ve not been good enough defensively to qualify, which is a real disappointment for us.

“I wasn’t aware of the other game but it’s about doing your own job. When I did find out, I had to be picked up off the floor.”

Torrential rain, thunder and lightning heightened the drama as these two clubs slugged it out for the prize of progress to the knockout stages.

Hundreds of Leicester fans were late arriving at Diego Armando Maradona Stadium after their shuttle buses were caught in the Naples traffic. They were still filtering into the stand when Leicester’s defensive frailties were punished after four minutes.

A misplaced pass from the returning Youri Tielemans was intercepted and Adam Ounas, making his first Napoli start in over two years, drilled a low shot into the corner.

Leicester did briefly respond but Napoli, third in Serie A, extended their lead in the 24th minute when Andreas Petagna squared to Eljif Elmas and he had the simple task of guiding a shot into the empty net.

Surely this was the tie over, but Leicester were back in it less than three minutes later, Jonny Evans stabbing home from close range after Napoli failed to adequately clear a James Maddison free-kick.

Napoli were now wobbling, and Leicester equalised before half-time with a 20-yard volley from midfielder Kiernan Dewsbury-Hall.

The rain was now hammering down and the running track around the pitch resembled a moat. Yet Leicester’s defending remained less than watertight and Elmas put Napoli back in front in the 53rd minute after a low cross from the right.

As Leicester sought another response, Maddison struck the outside of the post while Jamie Vardy headed over the bar in added time, but Napoli managed to resist the late pressure despite never appearing confident themselves.

Remarkably, there was brief hope of Leicester finishing as runners-up as Legia’s Tomas Pekhart stepped up to take a penalty over 1,000 miles away, but his kick was saved by Spartak’s Aleksandr Selikhov.

Leicester’s Europa League campaign is over at the first hurdle and the newly devised Conference League now awaits, with the knock-out play-offs starting in February.

“I don’t know anything about the competition, my focus was on winning the group or coming second,” Rodgers said. “It’s European football and another experience for us with some really good teams in it, so we can look at it after we put this to bed.”