David Syers scored a last-minute winner for Doncaster Rovers at Oldham.
The substitute headed home from Tommy Spurr's cross to give the promotion hopefuls a first win in five matches.
Rovers took an early lead through Rob Jones after Billy Paynter's flick from a David Cotterill free-kick had come back off the post.
Youssouff M'Changama levelled for the Latics when his effort from 25 yards slipped through the grasp of visiting keeper Gary Woods.
VIEW FROM THE DRESSING ROOM
Doncaster boss Dean Saunders told BBC Radio Sheffield:
"The conditions spoiled the game really. It was a battle out there and a bit of a scrappy game.
"I suppose it could have gone either way but we got on top of them in the second half. We couldn't find the finishing touch to the chances we created.
"We're getting results and that's all that matters.
"I've got to gradually build the team and keep getting better and better."
Oldham Athletic 13 Bouzanis 03 Grounds 05 Mvoto Booked 16 Byrne 23 Wabara 04 Wesolowski 07 Croft 08 Furman 22 M'changama (Montano - 83' ) 14 Smith 20 Baxter Substitutes 01 Cisak 02 Brown 26 Winchester 24 Hughes 11 Montano 19 Taylor 21 Millar Doncaster Rovers 33 Woods 02 Quinn 05 Jones 14 Spurr 16 McCombe 11 Cotterill 20 Harper 30 Keegan Booked (Syers - 62' ) 08 Paynter (Brown - 79' ) 17 Hume Booked 23 Bennett Booked (Husband - 83' ) Substitutes 13 Maxted 03 Husband 04 Martis 19 Griffin 06 Syers 09 Brown 10 Blake