Tranmere snatched a victory with an injury-time goal by substitute Gary Jones.
The Merseysiders were lucky to take all three points after missing a penalty in the 81st minute.
Jones, who only joined the action in the 82nd minute, found the target with an angled shot past substitute keeper Bart Griemink when set up by Iain Hume.
Griemink had joined the action after 23 minutes when Rhys Evans was forced off through a leg injury.
The penalty, in the 81st minute, was awarded against Matt Heywood for handball but it looked very harsh. Substitute Eugene Dadi took the spot-kick but blazed over the bar.
It was a second win in two matches for new Tranmere boss Brian Little. It was a fifth successive reverse in the League for Swindon, but they deserved better on the night after a battling performance.
Tommy Mooney worked hard. He powered a header just wide midway through the opening half following a corner and only just cleared the bar with a speculative 45-yard lob in the 72nd minute.
Hume was best for Tranmere. He brought the best out of Evans in the early stages and also saw a 12th minute shot deflected onto the crossbar.
Little said: "Everyone worked hard and the six points are very welcome. We have played two hard games and the players deserve credit." Andy King, the Swindon boss, felt his side deserved at least a draw: "We have had the game stolen from us," he claimed.
But he was pleased with the reaction of the players after a woeful performance at Chesterfield at the weekend: "They were 50-100 per cent better this time." But King said that he felt the penalty decision was a bad one: "We survived that one but the players were devastated over the winning goal.
"They felt Hume was coming back from an offside position when he laid on the pass from which Jones scored. The referee's decisions disappointed me all night, but there's no point in arguing."