(Reuters) - Liverpool kept their top-four destiny in their own hands as Philippe Coutinho's double earned them a 4-0 Premier League victory at West Ham United on Sunday that moved them back above Manchester City into third place.
Arsenal's late surge had put Juergen Klopp's side under immense pressure but they responded in style and will definitely finish in the top-four if they beat relegated Middlesbrough at Anfield on the final day of the season next Sunday.
Anything other than a victory at West Ham's London Stadium would have left Liverpool relying on other results going their way but once Daniel Sturridge put them ahead in the 35th minute they were relatively comfortable.
Brazilian playmaker Coutinho struck twice in the space of four minutes midway through the second half and Divock Origi rubbed salt into West Ham's wounds as the visitors ran riot.
Liverpool have 73 points with one game left, one ahead of Man City and four more than Arsenal who both have two to play.
"It was a fantastic game but difficult. At the end it was amazing but the start was not that good. After that we controlled the game and took our chances," Klopp said.
"We scored some really nice goals but in the first half West Ham had big, big chances -- especially to equalise before half-time. It was really unlucky for West Ham, but it was really lucky from our position."
Until England striker Sturridge, making his first league start since the first week of January, opened the scoring Liverpool had seemed nervy as West Ham looked intent on putting a spanner in their top-four hopes.
West Ham's Sam Byram wasted a golden chance early on, shooting wide after being played clear by Manuel Lanzini.
Joel Matip struck the underside of the crossbar for Liverpool as the game swung from end to end.
The goal Liverpool craved arrived when the silky Coutinho's defence-splitting pass sent Sturridge clear and he left keeper Adrian grounded with a neat stepover before calmly sliding the ball into the net.
Liverpool survived a scare when Andre Ayew somehow struck the same post twice from point-blank range in the space of seconds just before the interval.
Klopp's side could breathe easy though when Coutinho fired in a rebound after 57 minutes after Georginio Wijnaldum's shot cannoned back off the woodwork.
Four minutes later Coutinho made the points safe after finishing off a counter-attack, although West Ham's players were incensed that a foul in the build-up had gone unpunished.
Origi steered in Liverpool's fourth as the visiting fans celebrated a likely return to Europe's elite competition.
Not that Klopp is taking anything for granted.
"Middlesbrough have nothing to lose but we have everything to lose," he said of the clash against a side already down.
"The first thing the boys said in the dressing room -- and I didn't have to tell them -- was 'one more game'.
(Reporting by Martyn Herman; Editing by Toby Davis and Pritha Sarkar)