Carlton Morris' controversial early goal gave Barnsley a 1-0 win over Rotherham which virtually sealed their place in the play-offs while putting a further dent in their South Yorkshire rivals' survival hopes.
Barnsley now need just a point from their remaining two games to be certain of a top-six spot while Rotherham, who spurned a host of chances, are four points adrift of safety following their fourth straight defeat.
The hosts got off to a flying start with Cauley Woodrow's downward header turned over by Viktor Johansson inside the opening minute.
Morris scored from the resulting corner, with the goal allowed to stand despite the striker appearing to impede the 'keeper as he jumped to connect with the ball.
With the Rotherham players still protesting about the incident, play was held up as Johansson received lengthy treatment before being helped off the pitch and replaced by Jamal Blackman.
Chiedozie Ogbene fired a long-range effort straight at Brad Collins and the 'keeper was forced to race out of his area to clear when Freddie Ladapo threatened as Rotherham looked for a response.
There was a great chance for the visitors when Ladapo found Michael Smith in a good position inside the area, but he delayed his shot, allowing Callum Brittain to close him down and make a vital block.
Rotherham skipper Richard Wood then saw his deflected effort comfortably held by Collins.
In the closing stages of the half, Ladapo lost his footing as he shaped up to shoot and his effort was smothered by Collins.
Barnsley head coach Valerien Ismael made a change at the start of the second half with Jordan Williams replacing Callum Styles.
Ogbene posed a threat soon after the restart when he found himself in space on the right-hand side of the area, but Collins came out to narrow the angle and turned the ball wide at his near post.
Ladapo wasted a great opening when Smith found him in space inside the area with the goal at his mercy, but he failed to make contact with the ball, much to Barnsley's relief.
Rotherham boss Paul Warne made a change in attack before the hour mark with George Hirst coming on in place of Ladapo.
Daryl Dike had a chance to double Barnsley's lead, but Wood came to his side's rescue, turning the ball wide.
At the other end, another chance for Rotherham went begging when Smith headed wide from Wes Harding's pinpoint cross.
Ogbene also had a glorious opportunity to level in the 88th minute, putting his close-range effort straight at Collins.
Hirst had a shot deflected wide in stoppage time with many of the Rotherham players sinking to their knees when the final whistle blew.
What the managers said...
Barnsley boss Valerien Ismael: "It was a really, really poor performance. We got the three points, which I think is the most important thing. Big congratulations to Rotherham - they deserved more than losing the game. It was the expected fight. Maybe we scored too early. We never came into the game and we were always too late.
"Our decision-making was too slow. At the end of the day, in two weeks, nobody will speak about that performance. It's all about getting the three points and we did it."
Rotherham manager Paul Warne: "I thought we'd done enough to get a win, let alone a draw. The lads gave everything but unfortunately the most crucial part of that is putting the ball in the net and we didn't today, although we created enough chances.
"I'm a tad frustrated. I think everybody had the same opinion as me (about the goal) but the only one that counts is the ref's. Goalkeepers get protected more than any other player on the pitch and I've had a player sent-off recently for doing less than that and having a three-match ban.