Portadown snatched defeat from the jaws of victory in a thrilling Mid-Ulster derby at Stangmore Park on Tuesday night.
The strugglers were seven minutes from a vital win at Dungannon.
But late goals from Gary Liggett and Andrew Mitchell saw the Tyrone side triumph, keeping the heat on the Ports.
Portadown had the better chances in the first half, with Chris Casement heavily involved in their best moves.
Early on a dashing run took him into the box but his finish was poor.
He then worked the goalkeeper from a long-range free-kick, before providing the corner for the Ports’ best chance.
His delivery was flicked on to Garry Breen, whose close-range header beat Andy Coleman but ricocheted back off the crossbar.
The deadlock was broken in the 31st minute.
Two of the young players combined as some good build-up play on the left ended with Matty Parker crossing to Ferris, who headed home.
Dungannon stepped their performance up a gear after the break.
It seemed set to be a night of frustration for Dungannon - but the introduction of Liggett was the catalyst for a dramatic comeback.
The striker levelled with seven minutes remaining, firing home from close range after connecting with a cross from Mitchell.
Then in the 92nd minute Liggett turned provider for Mitchell, who won it with a terrific shot on the turn.
DGN SWIFTS: Coleman, Burns, Hegarty, Armstrong, O’Rourke, Fitzpatrick (Glackin, 54), Harpur, Hazley (Liggett, 75), Burke, Teggart, Mitchell (Lowe, 90)
Subs not used: Addis, Montgomery
PORTADOWN: Miskelly, Ramsey, Breen, Oman (Judge, 56), Gault, Garrett, Mackle, Casement, Twigg, Parker, Ferris (Soares, 89)
Subs not used: Marron, Mouncey, Withers
Referee: Andrew Davey (Bangor)