Match ends, West Ham United 1, Everton 2.
- Lukaku scores sixth goal in six games against West Ham
- West Ham won two of last 15 Premier League games
- Everton's four yellow cards dent Europa League hopes
Romelu Lukaku scored an injury-time winner as Everton beat West Ham at Upton Park.
Stewart Downing had given the Hammers the lead before Leon Osman equalised for the visitors with an acrobatic finish.
But Lukaku got his 20th goal of the season heading home Aiden McGeady's pinpoint cross on 93 minutes.
Four yellow cards put a dent in Everton's hopes to qualify for the Europa League via fair pay.
Lukaku's winner means he has now scored for Everton every time he has played against West Ham, with four goals against the Hammers this season.
Both sides had started the match leading the race to qualify for Europe through their positions in the Fair Play table. West Ham's only consolation from the match is that they are now in pole position, with the qualifying stages starting on 2 July.
The visitors moved into the top half of the table at the Hammers' expense.
Everton also gave a Premier League debut to 19-year-old Brendan Galloway, who deputised at left-back for Leighton Baines who is recovering from ankle surgery.
West Ham felt they should have had a penalty for a handball early in the first half when Aaron Cresswell's cross struck Seamus Coleman.
But referee Kevin Friend judged the ball had hit the defender's chest.
It wasn't until Downing's goal on 62 minutes that the game burst into life.
The England midfielder exchanged passes with Alex Song before placing a clinical left-foot shot inside Adrian's far post for his sixth Premier League goal of the season.
But the lead lasted just six minutes as Lukaku found Osman in the centre of the box. With his back to goal, he took one touch before volleying home.
Adrian produced a fine one-handed save to deny Lukaku on 86 minutes before the Belgian grabbed the winner, his sixth in six games against the Hammers.
Everton manager Roberto Martinez:
"He (Lukaku) has a big game mentality in terms of always being switched on, waiting for the moment to give us the three points.
"You don't start the beginning of the season hoping to finish top of the fair play table.
"To get into Europe or not is something that is not in our hands. If it comes our way we'll embrace it."
West Ham manager Sam Allardyce:
"I'd have sooner had four bookings today and won 2-1, rather than have one booking and lose 2-1, believe you me.
"It was a blatant handball. It's a big problem for me when they (the referees) miss such easy decisions."
"I'm frustrated with the team and the result. I'm not worried about my position.
"I don't think I need to prove what I can do as a manager."
- 19CollinsSubstituted forBurkeat 14'minutes
- 2ReidBooked at 26mins
- 24ColeSubstituted forde Carvalhoat 70'minutes
- 31E Valencia
- 12de Carvalho
- 23ColemanBooked at 33mins
- 32GallowayBooked at 90mins
- 18BarryBooked at 45mins
- 16McCarthyBooked at 74mins
- 25LennonSubstituted forMcGeadyat 78'minutes
- 20BarkleySubstituted forMirallasat 70'minutes
- Kevin Friend
- Shots on Target
Second Half ends, West Ham United 1, Everton 2.
Foul by Gareth Barry (Everton).
Enner Valencia (West Ham United) wins a free kick in the attacking half.
Goal! West Ham United 1, Everton 2. Romelu Lukaku (Everton) header from very close range to the bottom left corner. Assisted by Aiden McGeady with a cross.
Phil Jagielka (Everton) wins a free kick in the defensive half.
Foul by Enner Valencia (West Ham United).
Brendan Galloway (Everton) is shown the yellow card for a bad foul.
Foul by Brendan Galloway (Everton).
Cheikhou Kouyaté (West Ham United) wins a free kick in the defensive half.
Attempt missed. Romelu Lukaku (Everton) header from the centre of the box misses to the left. Assisted by Kevin Mirallas with a cross following a corner.
Corner, Everton. Conceded by Winston Reid.
Attempt blocked. Aiden McGeady (Everton) right footed shot from the left side of the box is blocked.
Attempt blocked. John Stones (Everton) header from the centre of the box is blocked. Assisted by Kevin Mirallas with a cross.
Corner, Everton. Conceded by Aaron Cresswell.
Corner, Everton. Conceded by Adrián.
Attempt saved. Romelu Lukaku (Everton) left footed shot from the left side of the box is saved in the bottom left corner. Assisted by Aiden McGeady.
Corner, West Ham United. Conceded by Leon Osman.
Corner, West Ham United. Conceded by Brendan Galloway.
Attempt missed. Romelu Lukaku (Everton) header from the right side of the six yard box misses to the right. Assisted by Aiden McGeady with a cross following a corner.