Odin Bailey scored his first league goal for Stockport as the League Two leaders twice came from behind to beat Swindon 4-2.
Dan Kemp gave Swindon the lead against the run of play in the 31st minute with a deflected long-range effort.
Will Collar equalised from the penalty spot seven minutes into the second half after goalkeeper Murphy Mahoney had upended Macauley Southam-Hales.
Jake Young restored Swindon’s advantage just after the hour, converting a Saidou Khan pass from midway inside the penalty area.
Kyle Wootton again headed Stockport level from Ibou Touray’s cross in the 69th minute.
Bailey put the visitors in front four minutes later by firing into the top corner from just outside the box.
Stockport sealed the victory – their 13th of the season – when they added a fourth through substitute Callum Camps a minute from time.
The defeat is Swindon’s fifth in a row, leaving them 12th in the League Two table while Stockport are five points clear at the top.