Liverpool came from a goal down to win at West Ham and boost their hopes of securing European football next season.
The Hammers took a 12th-minute lead when Lucas Paqueta, after playing a one-two with Michail Antonio, fired from 20 yards out past Liverpool goalkeeper Alisson.
But the advantage lasted less than six minutes before Cody Gakpo equalised with his own shot from outside the penalty area.
West Ham thought they had gone back in front with Jarrod Bowen’s angled strike but the England forward was ruled offside by the video assistant referee to keep it at 1-1.
An unmarked Joel Matip scored what proved to be the winner in the 67th minute with a powerful header from Andy Robertson’s corner from the left.
There was a late scare for Liverpool when Thiago handled in the penalty area, with Hammers boss David Moyes furious that a decision was not awarded by either on-field referee Chris Kavanagh or Neil Swarbrick on video assistant referee duty.
At the final whistle Moyes confronted Kavanagh, still angry at the decision that cost his side an opportunity to earn a point.
Liverpool still hoping to salvage something from difficult campaign
It has been a tough season for Liverpool, who came second in 2021-22, losing out to Manchester City by one point as the title race went to the final day of the season.
They went out of both the FA Cup and Carabao Cup, competitions they won last season, at the fourth-round phase and were hammered 6-2 on aggregate by Real Madrid in the last 16 of the Champions League.
Therefore, to miss out on European football altogether would be a massive setback for Jurgen Klopp’s side.
They may have to settle for the Europa League at best and will need to finish fifth or sixth to qualify for the second-tier European competition, while seventh would leave them in the play-offs for the third-tier Europa Conference League.
This win takes them sixth and above Tottenham on goal difference, although Champions League football looks beyond the Reds as they are six points behind third-placed Newcastle and Manchester United in fourth, with both sides having at least one game in hand.