Jürgen Klopp hailed this victory as the “first ugly game” Liverpool have won and the manager was correct. His side stuttered badly before avoiding becoming Burnley’s first scalp on the road, a better though imperfect second-half display rescuing a dire first-half one.

The three points take Liverpool to five and six respectively ahead of the chasing Arsenal and Manchester United, having completed two matches more. A pleased Klopp said: “It is the first ugly game we won. Usually when we are not at our best we have lost. The only thing is when you aren’t at your best it is close game and that is how it was.”

Sean Dyche’s men had managed only two points away from home yet, when – after seven minutes – Ashley Barnes recorded a first Burnley goal at Anfield since October 1975, the victory was on.

Liverpool 2-1 Burnley: Premier League – as it happened Read more

Klopp’s one change from the XI that beat Arsenal last time out was enforced, a thigh injury ruling out Roberto Firmino. Divock Origi replaced the Brazilian. Burnley showed three changes from the defeat at Swansea City, with Dyche bringing in Tom Heaton, Scott Arfield and Barnes.

Liverpool began with a flurry that had Philippe Coutinho threatening Heaton’s goal. But next Burnley pinned Klopp’s men back for a passage in which Andre Gray’s pace posed questions down the right and ended with a slick opener.

When Jeff Hendrick found Matthew Lowton in an inside channel, the right-back delivered a skidding pass that removed the rearguard and which Barnes met with a smash past Simon Mignolet for his fifth goal of the season.

Klopp said: “The goal we conceded we could have done better. There were a few other moments, a lot of headed challenges and then you are 1-0 down.”

The travelling support were singing “We are super Burnley” and memories flooded back of the visitors’ 2-0 defeat of Liverpool at Turf Moor in August’s reverse fixture. Then they stunned Klopp’s side after only two minutes. Now, the task for Liverpool was to avoid conceding another first-half goal, as the had done that day. Sadio Mané suggested how by taking the contest to the visitors. His cross contained menace but Origi could not reach it.

What followed, though, was drift from the red-shirted side. On that late summer’s afternoon in Lancashire Burnley hit Liverpool on the break. Now they were allowed to operate via a patient build-up that Klopp’s high pressing system is supposed to smother. A group of players the German said had instantly focused on this encounter post-Arsenal were surprisingly disjointed, with Mané proving the only bright spark as the half-hour approached.

The familiar sight of the Senegalese bursting along the right wing before feeding Origi ended with the No27 failing to find Georginio Wijnaldum. This was the story of Liverpool’s half: no rhythm could be found. They enjoyed more ball and territory yet Burnley were comfortable. Towards the end Coutinho, who usually possesses the time that marks the best, was hassled into stabbing the ball out.

Then, as can be football’s way, Liverpool grabbed an unlikely equaliser. Origi punted the ball into the area and a defensive mix-up involving Ben Mee ended with Wijnaldum burying the finish. This was the final touch before the interval.

Despite the goal Klopp’s job remained the same: to engineer a turnaround in ascendancy for Liverpool. The problem is there is no solution for a manager, whatever his instructions, if the ball is wasted, as Emre Can and Coutinho continued to do at the start of the second half.

On the hour Klopp had enough and it was Coutinho who was removed for Ben Woodburn. Immediately after this Origi fed the hitherto misfiring Can and the German drilled a 25-yard shot to the left of Heaton, who might have done better.

This was followed by Can being booked and Burnley nearly profiting: from the free-kick a Mee header fell to Barnes, whose effort was blocked by Ragnar Klavan.

Steven Gerrard: 'I thought I was a bit young to be Liverpool's captain at 23' Read more

Liverpool finished camped in Burnley’s half and with Mané forcing a fingertip save from Heaton. But Klopp should be worried: in the closing moments Lowton might have forced the draw. It sums up the home team and their manager seems not to know which Liverpool is going to show up.

Dyche was right when he said Burnley deserved more fortune. “I don’t search for luck. You have to make your own but it is nice every now and again if you get a slither,” he said.

With only 10 matches remaining Klopp will take more ugly victories. “If we want to stay where we are, we need to win football games,” he said before ruling the injured Jordan Henderson out of England’s friendly with Germany and World Cup qualifier against Lithuania.

“No chance,” Klopp said. “The break hopefully is two weeks. We hope that will bring him back but there will be no game in this time [for him]. He cannot train. Hopefully he can run in the second week of the international break and then we will have to see.”