Dungannon Swifts will be playing in the Premiership again next season after their top flight status was finally secured at Mourneview Park.
A dramatic injury-time equaliser from Emmet Friars snatched the point needed to guarantee another campaign among the elite of Irish League football.
In the end, both Dungannon and Glenavon – who were also in danger of dropping down – could have lost the game and still survived.
Defeat for Lisburn Distillery against Ballymena United rendered this match meaningless, with the Whites finishing the campaign second bottom.
They will now play off against Newry City for a place in next season’s Premiership.
For Dungannon, however, it was a satisfying end to a turbulent 12 months at Stangmore Park.
This has been one of their toughest campaigns, marred by disappointing results on the pitch and three managerial changes in the dugout.
But with their cherished senior status secured, Rodney McAree and Darren Murphy can now get down to the serious business of planning for next season.
Inevitably players will move on – Craig McClean is set to sign for Crusaders – and next season will once again be a battle against the odds.
However, it will be a season spent in the Premiership rather than the Championship wilderness, and that was always the priority.
Swifts’ status had been in doubt right up until the final fixture of a long campaign.
And while there were various permutations which could save them, the equation was simple – avoid defeat at Glenavon to ensure survival.
Yet the afternoon started badly as Glenavon – who needed three points to guarantee their safety – charged into a fourth minute lead.
A long ball from Kyle Neill was cleared to the edge of the box and Brian McCaul took aim, although goalkeeper Niall Morgan will be unhappy that the strike slipped past him so easily.
News of an early goal for Distillery against Ballymena added to their woes.
But then Dungannon were handed – quite literally – the perfect chance to level when they were awarded a 20th minute penalty.
A hand ball by Ciaran Doherty was penalised, but Friars’ spot kick was blocked by the ‘keeper.
Dungannon did not let the setback affect them, however, and finished the half strongly.
Michael Ward fired over from a Stefan Lavery cut-back, while Lavery had an effort cleared off the line following a free-kick from Ryan Harpur.
Later Lavery just failed to get a touch on Johnny Topley’s inviting cross, while the ‘keeper made a good save from Ward’s close-range strike.
The momentum tilted back to Glenavon after the break and Neill twice went close from free-kicks, but both times he was denied by Morgan.
Another delivery from Neill caused havoc and, when the ball dropped to Tony Grant, his overhead kick was headed off the line by Johnny Montgomery.
The big news, however, was coming from the Distillery game, where Ballymena were now leading 2-1. If that stayed the same, both Dungannon and Glenavon would be safe.
And it seemed the Co Tyrone side would be reliant on that result when they conceded a second goal in the 68th minute.
Michael McKerr tripped Ryan Henderson in the box, and McCaul converted the resulting penalty.
Dungannon needed a response – and they got it.
Within five minutes a speculative 30-yard effort from Terry Fitzpatrick took a wicked deflection off Jay Magee, looping over the stranded ‘keeper.
A third Ballymena goal at Distillery meant the pressure was now off – whatever happened Dungannon would be staying up.
But they ensured a positive end to a difficult season with a late, late equaliser. A throw was flicked on by Adam McMinn, and Friars fired home from close range.
GLENAVON: Coleman, Shannon, Neill, Jay Magee, Jonny Magee, Henderson, Doherty, Hagan (Miskimmin, 63), Doherty, Hamilton, Grant
Subs not used: Gordon, Cherry, Mitchell, O’Hare
DGN SWIFTS: Morgan, O’Neill, Montgomery, E Friars, McClean, McKerr, Harpur, Fitzpatrick, Topley, Ward (Brolly, 72, McMinn 88), S Lavery
Subs: Murphy, Funston, Donnelly.
Referee: Raymond Crangle (Belfast)