Holders Glenavon had to come from two down at half time with three second half goals to reach the semi-final of the Euro Electrix Mid Ulster Cup against a lively Loughgall side.
The Villagers went in front in the ninth minute when a diagonal pass from Marcus Dallas found Peter Campbell on the left wing and he cut inside before slotting into the bottom corner beyond James Taylor.
Keith Kearney doubled the lead in the 29th minute with a superb free kick from the edge of the Glenavon box.
Conor McCloskey went close with two free kicks before the interval the first striking the upright and the second drawing a good save from Gareth Buchanan.
In the second half Glenavon’s superior fitness began to tell and, with Sammy Clingan pulling the strings in midfield, Niall Grace touched in McCloskey’s 73rd minute corner from almost on the goal line to halve the deficit.
It was all-square a minute later when Steo Donnelly got on the end of a flick on by Grace and finished confidently past Buchanan.
The winner came a minute from time when Clingan played a superb pass out to McCloskey on the right and he raced into the box and was unlucky to see his shot crash off the far post but ‘fox in the box’ Jordan Jenkins was on hand to tap home as he latched onto the rebound.