Jack Harrison scored his first career hat-trick as Leeds United avenged last week's FA Cup defeat with a thrilling Premier League victory over West Ham at London Stadium.
The visitors, who lost 2-0 seven days ago, were pegged back twice before Harrison scored the pick of his three goals with a neat chip over Lukasz Fabianski as Leeds made it consecutive league wins for the first time this season.
"This was a typical Premier League game," said Leeds boss Marcelo Bielsa. "It was good that it went in our favour but the margin was very close.
"It is a triumph for the players because of the effort they put in. The desire to win was very, very big."
Harrison opened the scoring with a fierce strike in the 10th minute but West Ham recovered from their lacklustre start to equalise through the in-form Jarrod Bowen.
Leeds took the lead again before the interval as Harrison sneaked in at the back post to convert off his thigh from Luke Ayling's downward header following a corner.
Pablo Fornals scored his first goal since November to draw the Hammers level for a second time in the 52nd minute, but Harrison sealed victory eight minutes later.
Bowen, who had earlier scored his fourth goal in three games, missed a golden chance in the final seconds to draw the hosts level as he could only chest the ball over the bar from a few yards when unmarked.
That came after both sides had goals ruled out as first, Mateusz Klich's effort was crossed off as it brushed an offside Rodrigo on its way in, before Andriy Yarmolenko's header was deemed offside
Bielsa's side move up one place into 15th, nine points clear of the relegation zone, although 18th-placed Norwich City have also played a game more.
West Ham remain fourth but the group of clubs in the chasing pack all have games in hand. Fifth-placed Arsenal are two points behind having played two games fewer.
West Ham were deserved winners in the third round cup tie between the sides - a game which saw them produce 17 shots to eight for the visitors.
But while the Hammers were in midweek action against Norwich City, Leeds did not play and they were full of running in the early stages. With much-needed league points at stake, they took control and an early lead.
Klich's stinging shot was parried by Fabianski and Harrison was the beneficiary as he fired Adam Forshaw's knock-back into the far corner.
The Hammers were not at their fluid best but their threat remained from set-pieces as Craig Dawson headed inches wide. If that was a warning shot, Leeds failed to learn their lesson as Bowen evaded his marker to head in the equaliser from the following 34th-minute corner.
Harrison claimed his second three minutes later as he ghosted in unmarked at the back post to turn Ayling's header in. It was no more than Leeds deserved as they dominated with 61% possession in the first half.
The hosts responded well as Fornals cut in on his right and wrong-footed Illan Meslier with the finish.
But with the game in the balance, Raphinha produced a moment of brilliance to slice open the Hammers defence with a through-ball for Harrison to lift over the onrushing Fabianski and complete a brilliant treble.
"I have to give credit to the players to play Leeds last week and then a game in midweek. An excuse? Maybe, but a bit of a fair one," said Hammers boss David Moyes.
"People who play against Leeds will know the intensity you need to play. We knew we had them in the league after the FA Cup but then the Premier League stuck the game in midweek.
"We found it difficult to get prepared quickly. We made mistakes, no-one else's fault, but there were other reasons for it as well."