Glenavon fought back from two goals down to defeat the Swifts in Tuesday's bottom-six game at Stangmore Park.
Matt Hazley scored a penalty after a foul on Stefan Lavery and James Costello slotted in after 23 minutes.
Marc Brown started the comeback three minutes later with a 20-yard free-kick and Mark Farren headed in the equaliser two minutes into the second half.
Ciaran Martyn netted the 59th minute winner, nodding in the rebound after a Guy Bates shot hit the bar.
Hazley converted the spot-kick on 16 minutes Eddie McCallion upended Lavery before Costello hit a post in a one-on-one with keeper Davy O'Hare.
Costello made amends by firing in from 12 yards after Glenavon failed to clear the ball.
A quick response was needed and it came with Brown's fine free-kick which gave keeper Johnny Curran no chance.
Farren's powerful header from a Brown corner brought the Lurgan Blues level and Martyn was well placed to head in the winner after Bates was denied by the woodwork.
Dungannon pressed for an equaliser with PJ Lavery and Chris Lavery both going close for the hosts.