Carl Winchester's stunning strike and Danny Philliskirk's header helped Oldham seal victory over Swindon.
Winchester gave Lee Johnson's team a spectacular lead, winning possession on the halfway line before firing a shot into the top corner from 25 yards out.
Oldham defender James Tarkowski tried to block Nathan Thompson's cross inside the box but could only send a looping deflection into his own net.
Philliskirk won it converting Jonathan Grounds' cross from close range.
VIEWS FROM THE DRESSING ROOM
Swindon Town manager Mark Cooper told BBC Wiltshire:
"I thought we deserved something out of the game, especially in the second half.
"Once we got level I felt we had the initiative to go and win it.
"But there was some sloppy defending for the cross in the box and they go 2-1 up.
"We had to risk everything going forward and we missed a couple of really good chances near the end."
Oldham Athletic 01 Oxley 15 Winchester 03 Grounds 04 Wesolowski 05 Kusunga 06 Tarkowski Booked 27 Philliskirk 08 Smith 09 Rooney 21 Millar (Clarke-Harris - 61' ) 19 Dayton (Schmeltz - 75' ) Substitutes 07 Schmeltz 11 Montaño 12 Mellor 14 Clarke-Harris 17 Rodgers 24 Joksts 29 Rachubka Swindon Town 01 Foderingham 23 Barthram 03 Byrne 22 Ward 05 Hall 02 Thompson 04 Luongo 15 Kasim Booked 11 Pritchard Booked (N'Guessan - 75' ) 09 Ranger 08 Mason Substitutes 12 N'Guessan 17 Waldon 19 Thompson 25 Belford 29 Branco 33 Ajose 34 El-Gabbas
Ref: Jeremy Simpson