West Ham 0
Philippe Coutinho kept Liverpool's Champions League challenge in their own hands by destroying West Ham at the London Stadium.
The Brazilian master provided a moment of magic to set up Daniel Sturridge for the first-half opener, and then scored two sensational solo goals after the break.
Divock Origi put the seal on a 4-0 victory as the Reds emphatically ensured a win over relegated Middlesbrough on the final day will take them back to Europe's elite next season.
Liverpool travelled to the capital knowing any slip-up could let Arsenal take the initiative in the race for a top-four finish, and faced a West Ham team who had dashed Tottenham's lofty ambitions just nine days earlier.
But they need not have worried, and were inches from taking an early lead when Joel Matip met Coutinho's corner with a downward header which bounced back up and clipped the crossbar.
West Ham did have their chances to open the scoring, with Sam Byram firing across goal and wide and Edimilson Fernandes shooting too close to Simon Mignolet.
But the breakthrough arrived in the 35th minute when Coutinho's exquisite through-ball, from inside his own half, exposed a gap the size of the nearby Blackwall Tunnel in West Ham's defence.
With Jose Fonte playing him onside, Sturridge was able to race towards goal before rounding Adrian and tucking in his first goal since January.
West Ham should have been level on the stroke of half-time but for an astonishing double miss from Andre Ayew.
The £20million forward prodded Manuel Lanzini's corner onto the far post from two yards out, and, as the ball rebounded to him, he hit the same upright again before Mignolet gathered.
Adrian was back in action after the restart as Liverpool peppered the Hammers' goal, with Origi, Adam Lallana and Georginio Wijnaldum all testing the Spaniard in quick succession.
But Adrian was a mere spectator as Liverpool grabbed their second, watching on as Wijnaldum's 57th-minute volley crashed back off the crossbar.
The ball came out to Coutinho, who weaved his way through what was by now masquerading as West Ham's defence before slotting the ball low into the corner from the edge of the area.
Four minutes later it was three, Coutinho again collecting the ball from Wijnaldum before dancing around a statue of James Collins and firing home.
The fourth arrived in the 76th minute when Adrian charged out of his goal to collect Sturridge's cross, missed it, and left Origi with a simple tap-in to round off a clinical display and a crucial victory.