Odin Bailey scored his first league goal for Stockport as the League Two leaders twice came from behind to beat Swindon.
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.
However, Jake Young restored Swindon's advantage just after the hour, converting from midway inside the penalty area following Saidou Khan's pass.
Kyle Wootton again headed Stockport level from Ibou Touray's cross in the 69th minute, and Bailey put the visitors in front four minutes later, firing into the top corner from just outside the box.
Stockport sealed their 13th victory 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.
Match report supplied by PA Media.