Oldham beat play-off rivals Halifax 2-0 in their Vanarama National League match at Boundary Park.
The Latics broke the deadlock on the half-hour mark through Kian Harratt, making his first start since joining from Fleetwood.
Halifax made a bright start to the second half, with Jamie Cooke seeing his effort saved by Tom Donaghy.
Harratt went close again for Oldham when his shot on the turn was just wide before Halifax defender Adam Senior sent a header from a free-kick across the face of goal.
Oldham, who sit fourth, made sure of victory in stoppage time when Mike Fondop headed in from a corner as fifth-placed Halifax slipped to a second straight defeat.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.