Jordan Pickford's incredible injury-time error handed Divock Origi a scarcely believable Merseyside derby winner as Liverpool claimed a dramatic 1-0 Premier League victory over Everton.
Everton had produced an admirable performance and could have ended its infamous Anfield hoodoo had it taken one of its numerous first-half chances, but just as it looked as if it had done enough for a point, Liverpool snatched all three in stunning circumstances.
Alisson, who had earlier brilliantly denied Andre Gomes, saw his free-kick cleared as far as Virgil van Dijk, whose skewed long-range effort appeared to be heading for the top of the crossbar, only for Pickford to inexplicably palm it back into the air, the ball then bouncing off the woodwork and into the path of substitute Origi, who had the simple task of nodding into an empty net.
It means Liverpool – whose manager Jurgen Klopp sprinted onto the pitch to celebrate – stay within touching distance of champion Manchester City, who it trails by just two points, with the Reds continuing to look like the most likely challengers to Pep Guardiola's side.
Everton – winless at their rival's ground since 1999 – had a gilt-edged chance to take the lead in the fourth minute when Yerry Mina, incorrectly not flagged for offside, somehow headed Lucas Digne's free-kick wide with the goal at his mercy.
Liverpool responded well to that scare and Sadio Mane lashed over from Mohamed Salah's clever ball. However, it was Everton which had the better of proceedings, and it will have been left wondering how it did not take the lead when Alisson produced heroics to preserve parity.
Theo Walcott headed Bernard's superb far-post cross back to Gomes, whose point-blank header was magnificently kept out by Alisson's flying save. Gylfi Sigurdsson attempted to bundle home the rebound in the resulting goalmouth scramble but Joe Gomez cleared off the line in the nick of time.
Pickford denied Xherdan Shaqiri with his leg at the other end, but the Toffees spurned another glorious opportunity when Walcott lost control of the ball after rounding Alisson.
Liverpool was much improved after half-time and Salah curled wide before Mane again missed the target following good work from Roberto Firmino.
Mane's wayward shooting performance continued as he failed to trouble Pickford from the edge of the area, and the Reds' hopes of triumph looked to have gone when Origi clattered against the crossbar from two yards out and Liverpool saw appeals for handball against Sigurdsson waved away by referee Chris Kavanagh from the follow-up.
Yet that proved only a prelude to a bizarre ending as Origi, brought on in the 84th minute playing in his first Premier League game since the beginning of last season, took his second chance to write his name into Merseyside derby folklore, sparking scenes of wild celebration typified by Klopp's sprint to rejoice with Alisson.
What does it mean? Off-colour Reds keep pace at top
Liverpool had the greater share of possession, but its performance did not really merit all three points and the reaction of manager of Klopp showed just how important it is to avoid slip-ups when attempting to chase down a foe as formidable as City.
Origi gifted a fairytale finish
Origi's move from Lille to Liverpool has largely proven a disappointing one, the Belgium international spending most of last season on loan at Wolfsburg, but he will hope the gift provided to him by Pickford will spark a revival in his Anfield career.
Derby misery for Pickford
Pickford has consistently been an excellent performer for Everton and was superb for England at the World Cup, but his error in a game of such magnitude will take a long time to live down.
Both sides have to contend with teams fighting at the wrong end of the table next up. Liverpool travels to Burnley while the visit of struggling Newcastle United to Goodison Park could prove the perfect tonic to any hangover Everton have from this game.