Dungannon struck late to win a thrilling Mid-Ulster derby.
It looked like the Swifts had blown it after Glenavon came from 2-0 down to draw heading into injury time.
Goals from sub Robbie Norton and Sammy Clingan had looked set to cancel out Daniel Hughes’s double.
But Seanan Clucas headed in an injury time goal to pinch it.
Dungannon created the first chance inside a minute when Cormac Burke took down a cross but shot wide.
At the other end Stephen Murray headed off target from six yards - an offside flag spared his bushes and meant it didn’t prove costly.
Hughes went close for the home side with a shot across goal that the goalkeeper pushed away.
The Swifts took the lead in the 25th minute.
Hughes, who broke his duck in the last home game against Ballymena, was on the mark again, running on to a ball from midfield before slotting through the goalkeeper’s legs.
Douglas Wilson went close to a second for Dungannon in the 35th minute.
Alan Teggart sent a cross in from the right which Wilson caught on his left foot, but his low shot was blocked by a defender.
In first half injury time a corner picked out Clucas in the six yard box. He looked set to make it 2-0, but headed over.
Glenavon upped their game in the early minutes of the second half and Marc Griffin was inches from connecting with Joel Cooper’s cross.
Cooper then went close in the 58th minute, hitting a powerful shot at the target which drew the best from home goalkeeper Andrew Coleman.
Dungannon had a great chance to go 2-0 in front on the hour.
Wilson rose to meet a corner from Burke and headed at goal, but it was cleared off the line by a defender.
Dungannon added goal number two in the 73rd minute from the spot after Kris Lowe was tackled by Cooper.
Hughes’ penalty was well placed, giving the goalkeeper no chance.
But from the brink of defeat Glenavon turned it around.
They pulled one back two minutes after Hughes’ penalty through Norton.
Cooper headed back and the ball broke to Norton 20 yards out, who scored with a low drive.
And they made it 2-2 in the 78th minute.
They won a foul on the edge of the box and Clingan curled home a beauty to level it up.
But there was one last twist in the 90th minute, as a corner found Clucas, and he headed home to win it for the Swifts.
DUNGANNON SWIFTS: Coleman, Lowe, Hegarty, Clucas, O’Rourke, Wilson, Hutchinson (McMenamin, 86), Burke (Mayse, 65), Teggart (Campbell, 86), Patton, Hughes
Suns not used: Addis, Fitzpatrick
GLENAVON: Tuffey, Griffin (McCavitt, 69), Lindsay, Singleton, McGrory, Marshall, Clingan, Cooper, Foley (Norton, 54), Daniels, Murray
Subs not used: Barr, Hunter, O’Mahony
Referee: Raymond Crangle (Belfast)