Cathair Friel scored an injury-time winner as Ballymena United beat Glenavon 2-1 in the Irish Premiership game at the Showgrounds.
After a goalless first-half, striker Friel broke the deadlock with a good finish on 48 minutes.
However, United's lead lasted only two minutes when Jordan Jenkins kept his composure to bring Glenavon level.
The game looked set to be a draw but Friel beat Jonny Tuffey in injury-time after converting Adam Lecky's cross.
Glenavon started the brighter side, with Andrew Doyle's long-range effort well saved by Jordan Williamson before Friel missed a glorious opportunity to test Tuffey at the other end.
Williamson produced a vital stop midway through the half to keep out McCloskey, who hit the target but failed to beat the home stopper.
Jenkins flashed a shot wide, before Andy Hall's corner looked like it was sneaking in at the near post but Williamson managed to claw the ball away as Glenavon had the better of the first-half chances.
James Knowles and Lecky then almost linked up for the Sky Blues, before Doyle was called into action as he cleared Friel's header off the line five minutes before the break.
Friel eventually opened the scoring with a well-taken finish after being set up by Lecky shortly after the restart, making no mistake as he poked past the helpless Tuffey.
Jenkins equalised two minutes later when Sammy Clingan's scuffed shot fell to the striker's feet, with the 19-year-old jinking inside and slotting home from seven yards.
The Glenavon youngster forced Williamson to tip around the post with another good effort, with the United stopper then denying Daniels with another important intervention.
Friel had another gilt-edged chance to put the home side back in front when he blazed over from seven yards, but the marksman made amends when he powered home Lecky's cross at the back post to spark wild celebrations amongst the home support.
After going on a winless run in the league dating back to September, David Jeffrey's men have now won three games in a row.
The Sky Blues remain seventh in the league table, but move three points clear of Glenavon after Friday's result.