Demarai Gray atoned for a missed penalty to scored the winner as Leicester City edged past West Ham United 2-1 at London Stadium.
Lukasz Fabianski, on his return from injury, brought down Kelechi Iheanacho in the area on nine minutes.
But the West Ham goalkeeper saved the spot-kick taken by Gray in the absence of Jamie Vardy.
Five minutes before the break, Leicester went ahead when Ayoze Perez nodded back Gray's cross for Iheanacho to head past Fabianski from close range.
On the stroke of half-time West Ham equalised, Anderson cutting the ball back for Pablo Fornals to sweep in his first league goal.
Gray restored Leicester's lead when put through by Perez on 56 minutes.
A first win in four matches keeps Leicester second on 42 points, 10 behind Liverpool.
A fourth successive home defeat leaves West Ham 17th on 19 points, one above the bottom three.
See: West Ham report
Next fixtures
West Ham: 1 Jan v AFC Bournemouth (H)
Leicester: 1 Jan v Newcastle (A)