Barnsley gained a crucial 2-0 win at home to Hull City on Saturday as Jacob Mellis and Chris O'Grady scored great goals.
Hull would have been promoted with a win but produced a poor performance. They conceded after four minutes when Mellis ran onto an O'Grady pass and powered in a super opener from a very tough angle.
O'Grady made it 2-0 on 50 minutes when he smashed the ball into the bottom left corner from 15 yards.
The Reds temporarily moved out of the relegation zone but fell back to 22nd place as Peterborough won 1-0 against Sheffield Wednesday in the evening kick-off.
Barnsley will now go to Huddersfield knowing that a win will keep them in the Championship.