It was not particularly pretty but Andy King’s 86th minute winner has kept Leicester City’s hopes of Premier League survival alive, at least for now. There was a frantic sense of do or die in the closing stages at the King Power stadium. Pearson and his players surely knew anything less than three points against West Ham, a side who have not won away from home since December 2nd, would see them doomed to relegation. At the final whistle, the players went to all four corners of the stadium to applaud their fans. Just four points behind Sunderland with six of their eight remaining games to be played at home, it is very much game on for Foxes. Andy King was the hero as Premier League strugglers Leicester City struck late to earn a vital three points against West Ham United . Leicester City hero King is joined by veteran striker David Nugent following the Welsh midfielder's late winner against West Ham United . Seasoned professional Nugent had the chance to all but secure Leicester City victory but the striker missed from the spot . Nugent saw his penalty kick thwarted by West Ham United's Spanish goalkeeper Adrian during the Premier League clash at the King Power . It was eyeballs out, quickfire action from the 80th minute. The Hammers had a flurry of chances with Schmeichel forced into two good saves and at the other end Aaron Cresswell made a miraculous block on the line to deny a Andrej Kramaric effort. But substitute Kramaric supplied Jamie Vardy whose scuffed shot was tapped in by King from two yards out. Pearson and his opposite number Sam Allardyce embraced and shared a raucous laugh before kick-off. Both are somewhat relieved of pressure. Nugent rues his missed opportunity as the former England international is denied a goal for relegation threatened Leicester City . West Ham United instantly punish the Foxes as Senegalese international Cheikhou Kouyate  scores their past Kasper Schmeichel . Leicester: (4-2-3-1) Schmeichel 6.5; De Laet 6 (King 79 6), Morgan 6, Huth 5.5, Schlupp 6; James 6.5, Cambiasso 7.5; Mahrez 7 (Albrighton, 45 7), Nugent 6, Vardy 7; Ulloa 6 (Kramaric 72 8) Subs: Konchesky, Drinkwater, King, Albrighton, Wasilewski, Schwarzer, Kramaric . Booked: None . Scorers: Cambiasso (12) King (86) Nigel Pearson: 7 . West Ham: (4-3-2-1) Adrian 7; Jenkinson 5, Collins 6, Reid 5.5, Cresswell 6.5; Noble 5, Song 6.5, Kouyate 7.5; Downing 6, Nolan 5.5 (Amalfitano 65 6); Sakho 7 (Cole 80, 6) Subs: Jaaskelainen, Demel, O'Brien, Amalfitano, Jarvis, Cole, Nene . Booked: Jenkinson, Redi, Collins, Cresswell . Scorers: Koutaye (32) Sam Allardyce: 5.5 . Referee - Mark Clattenburg: 6.5 . How Andy King scored late Leicester City winner, CLICK HERE for more Match Zone . West Ham United's Senegalese international Kouyate  celebrates after scoring to make it 1-1 while Wes Morgan appeals to the linesman . Leicester City take the lead via a spectacular effort from footballing legend Esteban Cambiasso at the King Power Stadium on Saturday . Cambiasso celebrates after scoring to make it 1-0 during the Premier League match between Leicester City and West Ham United . West Ham have had their Premier League survival all but assured since before Christmas and it appears even securing a finish outside of the Premier League’s bottom six for a third successive season – a feat not achieved since the last century – cannot win Allardyce a new contract. Meanwhile nobody realistically expected Leicester to escape their current predicament at the foot of the Barclay’s Premier League and seven points from safety before this game. If they do it will represent a remarkable turnaround in results. The message pre-match from Pearson and midfielder Jamie Vardy was that if they could recapture the spirit they showed in a 4-3 defeat against Leicester a fortnight ago they would overcome the Hammers. In starting the consistently lively Riyad Mahrez, an attacking intent was demonstrated and the home side were lively from the start. James Collins, the 31-year-old Welshman, made several important clearances in the first ten minutes for West Ham and the travelling fans responded with a chorus of ‘he’s the ginger Pele.’ But it was as he retreated to goal that the ball ricocheted off his back and into the path of Esteban Cambiasso who cooly put Leicester ahead after 12 minutes. The ball bounced kindly for the Argentinian whose sublime right footed strike just outside the D sailed in. As his teammates rushed to celebrate, he showed a wise head by urging them to get back into position. Cambiasso slides to his knees as he celebrates in front of the Leicester City fans following his opener for the relegation threatened Foxes . Leonardo Ulloa  draws a foul from Carl Jenkinson  during the Barclays Premier league match Leicester City and West Ham United . Moments later referee Mark Clattenburg made the right decision to award the home side a penalty after Carl Jenkinson brought down Leonardo Ulloa. But David Nugent's effort from the spot was woeful, low, right down the middle and easily saved by Adrian. They were left to rue the missed opportunity when the Hammers pulled one back in the 32nd minute. Alex Song sent a floating ball into he box which soared over the head Jeffrey Schupp and was controlled by Cheikou Kouyate, the Senegalese firing low and powerfully into the bottom left corner past a helpless Kasper Schmeichel. Kouyate was close to doubling his goal tally in the 73rd minute, his shot from Sakho’s lay off hitting the post. Meanwhile Vardy had two good chances in as many minutes. In a thrilling display of end-to-end action both sides demonstrated the best of their attacking wares and some rather poor defending too but ultimately Leicester deserved to come out on top. West Ham United midfielder Mark Noble holds off Matthew James  during the Barclays Premier league match at The King Power Stadium . West Ham United's Spanish goalkeeper Adrian comes out to try and deny Vardy a goal during the Premier League clash .
Relegation strugglers Leicester City took the lead in the first half thanks to footballing legend Esteban Cambiasso .
Nigel Pearson's side had the chance to double their lead three minutes later when the hosts were awarded a penalty .
However, Foxes striker David Nugent failed to convert the penalty as Spanish goalkeeper Adrian saved smartly .
West Ham United equalised with 32 minutes gone when Senegalese international Cheikhou Kouyate found the net .
Bot sides hit the post in the second half but it was Leicester City who earned a vital win thanks to Andy King .