Joshua Low put Oldham on a high as they took another big step towards cementing a place in the Division Two play-offs.
The former Cardiff man fired home a second-half winner to settle an end to end Roses clash with Barnsley.
Low has had to battle against injury since arriving at the start of the season but his return is a timely lift as Oldham chase promotion.
They had to battle hard against gutsy Barnsley but manager Iain Dowie thought the right side won.
Dowie said: “In terms of possession and the chances we created we deserved all three points.
“I was a bit worried about this one because I knew Barnsley would pose a big threat up front but we handled them well.
“Josh is always dangerous and he took his goal very calmly but there were plently of other good performers like Darren Sheridan and Paul Murray who was terrific.
“And I still have not given up hope of automatic promotion. If we can win our last five we will definitely be in the shake up.†Barnsley boss Glyn Hodges groaned: “We shot ourselves in the foot. There are things we work on in training but we did not put them into practice.
"We knew we were in trouble if we let Oldham turn us in the box yet they did it in the first five minutes and scored. We are doing some strange things but overall it was not a bad performance.†Oldham's opener was a fine effort by Wayne Andrews who turned his man 16 yards out and hit an unstoppable shot from a tight angle.
Barnsley levelled 17 minutes later as Dave Mulligan exploited poor defending to volley into the top corner from 14 yards.
The visitors almost went in front before half time as Mike Sheron hit the bar but they had few other chances and went down to defeat when Low drilled into the bottom corner on 56 minutes after David Eyres picked him out just inside the box.