LIVERPOOL, England — Divock Origi scored a bizarre winner in the sixth minute of stoppage time as Liverpool beat Everton 1-0 in dramatic fashion on Sunday to maintain its 19-year unbeaten record over its Merseyside rival at Anfield.

Virgil van Dijk mishit a speculative volley high into the air from outside the area, with the ball landing on the crossbar off the fingertips of Everton goalkeeper Jordan Pickford. It bounced a second time onto the bar and dropped down to the waiting Origi, who headed home from a meter out.

Liverpool manager Juergen Klopp's wild celebrations saw him run onto the field, punch the air, and jump into the arms of goalkeeper Alisson Becker

"I apologized immediately after to (Everton manager) Marco Silva," Klopp said. "I didn't want to be disrespectful."

Silva said: "If we scored that goal and been so lucky I might have done the same."

The victory kept second-placed Liverpool within two points of Manchester City after 14 games. Everton still hasn't won at Anfield in the league since 1999 and its players were crestfallen at fulltime, particularly Pickford, who was at fault for not tipping the ball over the bar for a corner.

"Everyone is devastated and silent," Everton defender Michael Keane said. "We are consoling Jordan. He got unlucky."

Origi, who came on as a substitute for Mohamed Salah in the 75th minute, hadn't scored for Liverpool since May 2017. The Belgium striker spent last season on loan at Wolfsburg and his days at Liverpool looked to be numbered.

"Those bad moments form you as a player," Origi said. "I try to play my game and enjoy it. Today it has paid off. Scoring as a striker is one of the most beautiful feelings. And in a derby, it makes it even more special."

Klopp has come under increasing scrutiny in recent days with Liverpool failing to replicate its devastating attacking form from last season, when it was arguably the most exciting team in Europe.

At least they created chances against Everton — unlike in the loss to Paris Saint-Germain on Wednesday.

Sadio Mane and Xherdan Shaqiri wasted opportunities when played clean through in the first half, while Mane slid a shot wide in another one-on-one situation with Pickford after the break.

With four minutes left of normal time, Origi stuck out a leg as a free kick was swung into the box and diverted the ball onto the top of the post. His luck would turn in injury time, though.

Everton's chances were just as good.

Yerry Mina headed a free kick from close range wide just a few minutes in and then Andre Gomes had a header from point-blank range spectacularly saved by Alisson. The ball rebounded off Gomes and was dribbling into the corner, only for Liverpool defender Joe Gomez to clear off the line.

Gomes is starting to make his influence felt in Everton's team now he is fully fit after injury and the Portugal international — on loan from Barcelona — was the standout player for the visitors with his vision and technique in midfield.

___

More AP English soccer:https://apnews.com/tag/PremierLeague andhttps://twitter.com/AP_Sports