Leicester’s late-season dash for the line has been built on a rock-solid defence which passed 500 minutes without conceding in the first half, but only after Cheikhou Kouyate saw his header hit Kasper Schmeichel’s left-hand post, bounce along the line and rebound off the other upright into the goalkeeper’s arms.
An unchallenged Robert Huth headed a set-piece wide at the other end, but Leicester took the lead with a typically razor-sharp counter-attack.
With West Ham defenders up-field for a free-kick, Schmeichel claimed the ball before hurling it to Mahrez on the halfway line, before Kante took over, driving through midfield to set Vardy free into the left-hand channel and the Englishman powered a left-footed shot across Adrian.
Kante then reverted to his destructive best, sitting deep in midfield to stifle Dimitri Payet, while Wes Morgan was a magnetic presence for the Frenchman’s few attempts to find the area from set-pieces.
Slaven Bilic replaced Pedro Obiang with Carroll – fresh from his hat-trick against Arsenal last week – in search of an equaliser and the visitors’ task was given a boost as Vardy was dismissed 10 minutes into the second period.
Booked before the break for a late challenge on Kouyate, the England striker was shown a second yellow card by Moss as he burst into the box before inviting contact from Angelo Ogbonna – an act deemed to be simulation by the referee.
West Ham were soon on the hunt, but it was not until the 84th minute that they drew level – Carroll sending Schmeichel the wrong way from 12 yards after Morgan had hauled down Winston Reid.
Two minutes later, the visitors were ahead as Cresswell’s magnificent hit from long range stunned the home crowd.
But the King Power rose to its feet at the death as substitute Jeffrey Schlupp fell under the backtracking Carroll’s challenge at the corner of the penalty area, with Moss incredibly pointing to the spot again and setting the scene for Ulloa’s crucial strike.