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 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.
Beto miss costly as Blues pay for lack of cutting edge
This was Everton’s first game since their 10-point deduction for breaching Premier League financial rules was reduced to six on appeal.
However, there remains a degree of anxiety around a separate charge – along with Nottingham Forest – for alleged breaches in their accounts for 2022-23.
That case must be heard by 8 April – but any appeal could take that process to 24 May, the week after the season has concluded.
If Everton are to render the impact of another potential deduction irrelevant, in terms of maintaining their top-flight status, they simply need to become more clinical in front of goal as the business end of the season looms.
For all their defensive improvements under Sean Dyche, their lack of cutting edge up front was again apparent.
Dyche dropped the misfiring Dominic Calvert-Lewin after a run of 20 games without a goal in favour of Beto.
The Portuguese striker, signed for £30m from Udinese last August, offered a willingness but lacked finesse and composure at the crucial moments.
That was most apparent when Everton were awarded a penalty – having been the only Premier League club not to be given one in the 2023-24 season up to this game – after an intervention by the video assistant referee.
A poor spot-kick from Beto was saved by West Ham goalkeeper Alphonse Areola, who dived low to his left.
Beto partially made amends with an unmarked headed goal from James Garner’s deep cross which, in truth, would have been harder to miss.
But given their collective failure to take chances across the pitch there is a strong sense that unless either Beto or Calvert-Levin are able to find the net regularly, Everton will not be able to relax during the run in.
Joy for Moyes as Hammers head home happy
Rumblings of discontent continue to hang in the clouds over Moyes’ future as Hammers boss, but the manner of this victory on his old stomping ground will have pleased him.
There was a goal from a set-piece to equalise from Zouma, a piece of individual brilliance from Soucek to take the lead and a clinical finish on the counter attack to seal the result.
Soucek’s goal, in particular, was a moment to savour and was akin to something Hammers legend Paolo di Canio might have produced at his peak.
The Czech deftly controlled a high cross-field pass in the corner of the box before striking a swerving shot with his instep, which flew into the corner of the net beyond Jordan Pickford.
In the manner of Italian Di Canio, Soucek peeled off his shirt in joyous celebration before Alvarez put the gloss on the result when he finished after Jarrod Bowen’s run from his own half as Everton were punished on the break.
Whatever negativity there may be around Moyes does not appear to be shared by his players who showed their fortitude, and work ethic, to earn this win on Merseyside.
The Hammers welcome Freiburg to the London Stadium for the first leg of a Europa League last-16 tie.
They do so with a spring in their step.