Newcastle took a big step towards securing their Premier League status with a dramatic win against 10-man West Ham.
However, West Ham, who had Craig Dawson sent off for two first-half bookings, drew level from a Diop header and a Jesse Lingard penalty that was awarded after a VAR review.
But with the visitors seemingly on top, Newcastle had the final say, substitute Joe Willock heading an important winning goal that lifts Steve Bruce's side up to 15th in the table, with a nine-point cushion to the bottom three.
West Ham remain fourth but have now played a game more than fellow Champions League hopefuls Chelsea and Liverpool, who will have the opportunity to leapfrog the Hammers before they play again.