Gillingham will be playing League One football next season after they beat Torquay United 1-0 to secure promotion.
Danny Kedwell's goal was enough to move the Gills eight points clear at the top of League Two.
York missed the opportunity to push Torquay into the relegation zone after Peter Murphy struck an equaliser in the fourth minute of injury time for Accrington Stanley.
Plymouth Argyle eased their relegation worries and dented Cheltenham Town's automatic promotion hopes by winning 2-0 at Home Park.
Northampton Town's promotion chances also suffered as Nahki Wells scored his first goal in 11 games to give Bradford City a 1-0 victory.
Kevin Ellison netted a late winner against his former club as Morecambe beat Rotherham 2-1.
Results in full: Barnet 0-2 Chesterfield, Bradford 1-0 Northampton, Bristol Rovers 1-0 Wimbledon, Exeter 0-1 Dagenham & Redbridge, Fleetwood 0-3 Rochdale, Gillingham 1-0 Torquay, Morecambe 2-1 Rotherham, Oxford United 0-1 Wycombe, Plymouth 2-0 Cheltenham, York 1-1 Accrington Stanley