Red flares fell from the Bullens Road stand housing Liverpool’s supporters but there was no sign of distress. They were signals of the delight, ecstasy and pandemonium that accompanies a stoppage-time winner in the Merseyside derby and the kind of victory that announces a Premier League title contender with resolve. The distress was everywhere else around Everton’s old stadium.

Jürgen Klopp covered his face in disbelief and delight when Sadio Mané reacted quickest to settle the 227th Merseyside derby in the 94th minute. His first visit to Goodison Park had revealed two sides of Liverpool, passive in the face of a high-octane Everton performance in the first half, superior in the second and the team more likely to win a derby high on attrition but low on quality.

When the fourth official signalled eight minutes of stoppage time – the consequence of Everton losing their goalkeeper Maarten Stekelenburg to injury and a Ross Barkley foul on Jordan Henderson that should have resulted in a dismissal – Liverpool sensed opportunity. Everton, without a win in 12 derbies and tiring from their first-half exertions, feared the worst.

The substitute Daniel Sturridge weaved across the home penalty area and away from an exhausted Leighton Baines. His low shot deflected beyond the reach of the replacement goalkeeper Joel Robles, struck a post and, with Mané far sharper than Ramiro Funes Mori and Ashley Williams, the Senegal international converted from close range to give Klopp a night to savour. He is the first manager in Liverpool’s history to win his first two derbies but moving within six points of the relentless Premier League leaders Chelsea is the statistic that will mean more.

Liverpool showed character plus evidence of strength in depth to recover from a subdued start and claim a victory that means in all competitions they have won as many derbies at Goodison as Everton. There was disruption in defence with Joël Matip again sidelined by an ankle injury but, with Ragnar Klavan dominating Romelu Lukaku, they gained a second successive clean sheet in the Premier League.

Klopp introduced Sturridge, Emre Can and Lucas Leiva from the substitutes’ bench to good effect. Ronald Koeman lost both James McCarthy and Stekelenburg to injury and had to turn to Dominic Calvert-Lewin, a teenager signed from Sheffield United in the summer, when seeking a second-half threat.

The differences told. The Everton manager admitted Barkley could have seen red for his foul on Henderson but claimed Dejan Lovren should have collected a second yellow card for his part in the mêlée that followed. Koeman’s biggest gripe should have been the complete absence of threat from his team, even when on top in the first half.

Everton started as their manager had requested – for once – showing the intensity and alertness that underpinned their recovery at home to Arsenal last week. Klopp had expected that tempo from his opponents, their desire to widen the play through Séamus Coleman in particular at right-back and willingness to go long to Lukaku, but was visibly enraged within five minutes as training ground plans failed to translate on the pitch. Not that Simon Mignolet was busy in the Liverpool goal other than dealing with a tame second-half header from Williams.

Funes Mori squandered the home side’s best chance when, given a free run and a free header at a Barkley corner shortly before the interval, the Argentina defender steered his effort badly wide. Liverpool had shown nothing of the movement or menace behind their emergence as the Premier League’s leading goalscorers but improved after the half-hour. Their first chance fell to Divock Origi when Georginio Wijnaldum and Nathaniel Clyne combined down the right. Clyne’s centre arrived a fraction behind Origi and, leaning back, he steered a good opportunity high over.

The usual passion was evident but the derby desperately required a shot on target. Liverpool finally obliged in the 50th minute when they parted Everton’s defence with ease and forced Stekelenburg into the first important stop. James Milner’s first-time ball from the left put Roberto Firmino clean through on goal. Funes Mori resisted temptation to invite another derby dismissal with a professional foul and his keeper rescued Everton, blocking Firmino’s effort with his chest and escaping when Mané and Adam Lallana got in each other’s way as they pursued the rebound.

Whatever Klopp said in the dressing room at half-time made an impact as his team started with the same intensity as Everton had opened the game. The hosts’ midfield balance was disrupted by the loss of McCarthy and their keeper was forced off after being on the receiving end of a vital interception from his own player. A lovely one-two between Mané and Firmino unlocked the home defence but, before the former could convert, Baines slid in to clear and clattered Stekelenburg in the process.

McCarthy’s replacement, Gareth Barry, teed up Lukaku for a header that sailed over Mignolet’s crossbar but Everton’s quality on the ball deteriorated markedly in the second half. They could easily have been reduced to 10 men for the final 30 minutes when Barkley caught Henderson’s ankle with a dangerous and reckless tackle but the referee, Mike Dean, opted for a lenient yellow. Everton’s punishment would come late and severe, and behind plumes of red smoke Liverpool revelled in a vital result.