MK Dons suffered a setback in their quest for automatic promotion from League One after Gillingham edged a dramatic six-goal encounter at the Priestfield Stadium.
The Buckinghamshire club fell behind to an early Cody McDonald strike and, while Devante Cole equalised, Karl Robinson's men were soon behind again thanks to Bradley Dack.
Ben Reeves restored parity with a penalty midway through the second period, but goals from full back Bradley Garmston and John Marquis gave the Kent outfit their second win under new manager Justin Edinburgh and kept the Dons outside the top two places.
However, the men from Milton Keynes did not lose ground as both leaders Bristol City and second-placed Swindon Town slumped to defeats.
A Matt Done brace helped Sheffield United to a 3-1 win against City, while Swindon were also beaten 3-1 by struggling Scunthorpe United.
Chesterfield missed the chance to move into the top six after relegation-threatened Leyton Orient came from behind before Dean Cox scored in the 11th minute of injury time to seal victory for the visitors at the Proact Stadium.
Oldham Athletic stay above Chesterfield, but lost at home to another candidate for the drop, Colchester United. Sammie Szmodics's second-minute strike proved enough for the Essex outfit to move to within a point of Coventry City.
Rochdale are five points off a playoff place, but have dropped to 15th in the table following their 2-1 defeat at Peterborough, with early goals from Harry Beautyman and Christian Burgess proving enough to extend Posh's recent resurgence.
Crawley Town moved to within two points of safety as Izale McLeod scored a hat-trick in the Sussex club's 5-1 win over Barnsley, who themselves are falling closer to the drop zone.
Crewe Alexandra are now seven points clear of the relegation places after Nicky Ajose and Marcus Haber netted in a 2-0 victory at home to playoff-chasing Fleetwood Town.
Port Vale also boosted their hopes of survival as a solitary Tom Pope goal saw them beat mid-table Walsall.
Yeovil Town are now rooted to the bottom of the division after losing 3-0 at Doncaster Rovers, with Nathan Tyson, Dean Furman and Kyle Bennett all on the scoresheet for the Vikings.
Results in full: Bristol City 1–3 Sheffield United, Chesterfield 2–3 Leyton Orient, Crawley Town 5–1 Barnsley, Crewe Alexandra 2–0 Fleetwood Town, Doncaster Rovers 3–0 Yeovil Town, Gillingham 4–2 MK Dons, Oldham Athletic 0–1 Colchester United, Peterborough United 2–1 Rochdale, Scunthorpe United 3-1 Swindon Town, Walsall 0-1 Port Vale