
The Reds were joined by Luton Town with both teams going up due to their promotion rivals dropping points.
Sunderland lost 2-1 to Fleetwood, while Portsmouth were beaten 3-2 in a dramatic encounter with play-off chasing Peterborough.
Barnsley and Luton will now battle it out to finish as League One champions, with the Reds away to Bristol Rovers and Luton at home to Oxford United.
The two teams are level on 91 points.