Dominic Calvert-Lewin scored his second hat-trick of the season as Everton booked their place in the Carabao Cup quarter-finals, but the cost of victory against West Ham may turn out to be a heavy one.
Calvert-Lewin put the home side in front with a well-taken 11th-minute effort after Michael Keane had picked him out with an excellent chipped pass over the Hammers' defence.
The England forward sealed victory with two goals in six minutes near the end, taking his tally in what is turning into a superb season to eight.
His second was a typical poacher's effort, the 23-year-old tucking home the rebound after Alex Iwobi's shot had bounced back off a post. Calvert-Lewin then got beyond the West Ham defence to finish off Gylfi Sigurdsson's through ball to complete another fantastic treble.
Richarlison had earlier put Everton back in front with a deflected shot after Robert Snodgrass had briefly pulled the visitors level just after half-time.
However, the Brazilian quickly abandoned his attempt to continue after having treatment to his left leg. And within eight minutes, his compatriot Allan was joining him in the dressing room after indicating he had pulled his groin.
The manner both men headed down the tunnel did not indicate a swift return and as Jonjoe Kenny had to be replaced before the break, the injuries cast a shadow over an otherwise excellent night for Carlo Ancelotti's men.
His side have now won six games in a row and if they were to beat Brighton on Saturday, it would represent the club's best start to a season since 1894.