Tomas Soucek struck a stylish half-volley as West Ham scored twice in injury time to clinch a dramatic win at Everton.
The Blues had taken the lead when Beto – who had seen a first-half penalty saved – headed in at the back post shortly after half-time.
Kurt Zouma equalised for the Hammers with a header from a corner.
The game looked set to end in a draw but Soucek scored a stunning goal with his instep in added time before Edson Alvarez struck right at the end.
It gave David Moyes, who managed Everton from 2002 to 2013, a hat-trick of Goodison Park victories over his old club as Hammers boss.
Moyes’ side move up to seventh in the Premier League table while Everton are 16th – five points above the relegation zone.
The Toffees are also winless in 10 games, stretching back to a 2-0 victory over Burnley on 16 December.
With five draws and two defeats in 2024, this is their joint-longest winless run from the start of a calendar year in their league history.