Match ends, West Ham United 2, Leicester City 2.
Leicester substitute Harvey Barnes scored in stoppage time to secure a controversial Premier League draw with West Ham in a frantic finish at London Stadium.
The Hammers looked on course for victory after Lucas Perez turned in the rebound when fellow replacement Pedro Obiang hit the post after 82 minutes.
The Spaniard should have had a second goal when he rounded Kasper Schmeichel after Obiang's through ball but was wrongly called offside.
That allowed the visitors to sweep forward in search of another equaliser and Youri Tielemans picked out Barnes, who slotted low beyond Lukasz Fabianski for his first Leicester goal.
Winger Michail Antonio put West Ham ahead for the first time before the break, rising above Ben Chilwell to head in Mark Noble's fine cross from the left.
Jamie Vardy levelled for the Foxes with his ninth goal in 10 league games thanks to an exquisite finish at the near post.
Leicester fall one place to eighth in the table, while West Ham remain 11th.
Leicester leave it late
Leicester were mostly lacklustre for the first hour, occasionally looking bright on the counter but lacking a clinical edge, with James Maddison's low drive that was easily saved their only chance of note.
Enter Vardy. The former England striker showed sharp instincts to get across Fabian Balbuena in a flash and divert Chilwell's low cross beyond Fabianski.
Manager Brendan Rodgers told The Premier League Show this week that he wants to establish Leicester as a top-six side.
It will be intriguing to see how long 32-year-old Vardy remains part of that project as he gives his team a vital intensity and dependable goal threat they otherwise can lack at times.
There is plenty of young talent, though. Maddison was lively throughout, Barnes showed tremendous composure to slide in his late equaliser, set up by the creative Tielemans, whom Leicester must want to sign permanently once his loan deal from Monaco ends.
To become a perennial top-six side, Leicester will have to be more convincing against West Ham and other ambitious mid-table teams, but there are promising signs to build on.
Hammers end losing run
After a run of three straight defeats, albeit including an unlucky loss to Manchester United last week, this was an encouraging performance by West Ham.
They were much the better side before the break, shifting the ball between the flanks to try and drag Leicester out of position, which paid off for the opener.
By applying pressure down the left, the hosts engineered a mismatch for Antonio on the much smaller Chilwell at the back post before Noble exchanged passes with Robert Snodgrass and picked out Antonio to firmly head in.
Antonio should have scored moments earlier when failing to turn in Marko Arnautovic's volleyed cross from two yards, and West Ham may feel they should have put a subdued Leicester away in the first half.
Yet they continued to create and were ultimately denied by a mistake. Arnautovic and Snodgrass were withdrawn for Perez and Obiang, who combined to twice put the ball in the net, with only one counting.
Leicester appealed for offside for the first but Perez timed his run exactly to side-foot home after Obiang's low, curling strike came back off the right-hand post.
In the game's most controversial moment late on, Obiang nipped the ball off Tielemans and played in Perez, who did not see the flag as he rounded Schmeichel, with replays showing he was just behind the foot of the last Leicester defender.
Man of the match - Michail Antonio (West Ham)
'More fair' with VAR - reaction
West Ham boss Manuel Pellegrini, speaking to BBC Sport: "We deserved more than a draw. We scored a legal goal for 3-1 and with that the game would have been finished, but it was a mistake of the linesman.
"I've seen it again and he was one metre onside. There is nothing you can do about that. Next season when we have VAR it can be more fair.
"We generally played well but you cannot concede two goals."
Leicester City boss Brendan Rodgers on Lucas Perez's disallowed late goal: "It looks like we got away with one.
"I'm delighted for Harvey Barnes, getting the goal will be a weight off his shoulders. It was a wonderful run and a really calm finish.
"Jamie Vardy is a top-class striker and it was a great touch, a really good finish."
Use your head, Antonio - stats
- Only Liverpool (16) and West Ham (15) have gained more points from losing positions in the Premier League than Leicester this season (14).
- Leicester have both scored and conceded in 13 away league games this season, more than any other side.
- West Ham's Michail Antonio scored his 25th Premier League goal, with 15 of them coming via his head. Of players with at least 25 goals in the competition, only John Terry (66%) has scored a higher percentage of headers than Antonio (60%).
- Jamie Vardy has scored nine goals in his past 10 league games for Leicester, including seven in his seven appearances under manager Brendan Rodgers.
- Harvey Barnes' goal was the 5,000th scored in the top four tiers of English league football this season.
- All four of Lucas Perez's Premier League goals (1 for Arsenal, 3 for West Ham) have come as a substitute.
West Ham travel to Tottenham in the Premier League on 27 April at 12:30 BST, while Leicester host Arsenal at 12:00 on 28 April.
- 41RiceBooked at 70mins
- 16NobleSubstituted forWilshereat 85'minutes
- 11SnodgrassBooked at 49minsSubstituted forObiangat 73'minutes
- 8Felipe Anderson
- 7ArnautovicSubstituted forPérezat 78'minutes
- 14Ricardo Pereira
- 11AlbrightonSubstituted forBarnesat 64'minutes
- 21TielemansSubstituted forMendyat 90+5'minutes
- 7GraySubstituted forIheanachoat 84'minutes
- Lee Probert
- Shots on Target
Second Half ends, West Ham United 2, Leicester City 2.
Substitution, Leicester City. Nampalys Mendy replaces Youri Tielemans.
Foul by Michail Antonio (West Ham United).
Harry Maguire (Leicester City) wins a free kick in the defensive half.
Attempt blocked. Michail Antonio (West Ham United) left footed shot from the right side of the box is blocked. Assisted by Arthur Masuaku.
Foul by Ben Chilwell (Leicester City).
Michail Antonio (West Ham United) wins a free kick on the right wing.
Goal! West Ham United 2, Leicester City 2. Harvey Barnes (Leicester City) right footed shot from the right side of the box to the bottom left corner. Assisted by Youri Tielemans with a through ball.
Offside, West Ham United. Pedro Obiang tries a through ball, but Lucas Pérez is caught offside.
Attempt saved. Ben Chilwell (Leicester City) left footed shot from outside the box is saved in the centre of the goal. Assisted by Harvey Barnes.
Attempt blocked. James Maddison (Leicester City) left footed shot from the centre of the box is blocked.
Attempt missed. Harry Maguire (Leicester City) header from the centre of the box misses to the left. Assisted by James Maddison with a cross following a corner.
Corner, Leicester City. Conceded by Fabián Balbuena.
Attempt missed. Harvey Barnes (Leicester City) header from the centre of the box misses to the left. Assisted by Jamie Vardy with a cross.
Substitution, West Ham United. Jack Wilshere replaces Mark Noble.
Substitution, Leicester City. Kelechi Iheanacho replaces Demarai Gray.
Goal! West Ham United 2, Leicester City 1. Lucas Pérez (West Ham United) right footed shot from the centre of the box to the bottom right corner.
Pedro Obiang (West Ham United) hits the right post with a right footed shot from outside the box. Assisted by Felipe Anderson.
Corner, West Ham United. Conceded by Ben Chilwell.