Everton reached the FA Cup quarter-finals after edging out Tottenham Hotspur in a nine-goal classic at Goodison Park.
A magnificent contest swung in both teams' favour before Carlo Ancelotti's hosts - showing huge reserves of resolve and fitness - finally struck the decisive blow when Bernard fired home in the seventh minute of extra time.
Dominic Calvert-Lewin, who later went off with what looked like a groin injury, levelled nine minutes before the break with a shot Spurs goalkeeper Hugo Lloris should have saved, before Richarlison's fine low drive and Gylfi Sigurdsson's penalty looked to have put Everton in command.
But Erik Lamela scored in the closing seconds of the first half to put Spurs back in contention and Sanchez pounced again after more chaos at a corner to drag Jose Mourinho's side level just before the hour.
Mourinho then introduced Harry Kane but it was Everton who edged ahead again as more brilliant individual work by Richarlison restored their advantage after 68 minutes - but it was inevitable Spurs' main man would have a say.
It came with seven minutes of normal time left as Everton were undone by the old firm, Son Heung-min's cross the perfect invitation for Kane to score with a far-post header.
All the momentum appeared to be with Spurs but Everton are now a side to be reckoned with under Ancelotti and Bernard cashed in after more good work by Sigurdsson - who was involved in three goals - to beat Lloris with an angled finish.
There was still time for Spurs to respond but Everton saw out an outstanding victory in relative comfort.
Swansea 1-3 Tottenham
Leicester 1-0 Brighton
Sheffield United 1-0 Bristol City
Everton 5-4 Tottenham