Derry City have qualified for the Europa League after Sligo Rovers defeated Drogheda United 3-2 in an enthralling FAI Cup final in Dublin.
Paul O'Connor put the Drogs ahead before substitute Danny North scored twice for Sligo in seven minutes.
Ryan Brennan equalised before Anthony Elding's injury-time winner.
The result means the last remaining European qualification slot falls to fourth place in the league, which is where Derry finished the campaign.
The news will be of some consolation to Derry fans after a season which had started promisingly ended with no silverware.
In a turbulent season the Candystripes were in contention for both cups and the league until the mid-season break, when they embarked on a run of losing 12 games in 17 in all competitions.
That period saw Derry dumped out of Europe by a vastly superior Trabzonspor side, and both domestic cups by the FAI Cup finalists - Drogheda in the EA Sports Cup and Sligo in the FAI Cup..
Although Derry finished the season relatively strongly with draws against champions St Patrick's Athletic and Shamrock Rovers, and a comprehensive drubbing of Limerick, their results against fellow top six clubs meant they were a distant 15 points behind the Inchicore outfit.
That was to cost Declan Devine his job even before finding out whether European football was secured, as his side won only three of 15 games against the five sides who finished in the top six.
With Mick Cooke likely to leave Drogheda and Sligo boss Ian Baraclough considering options from England, that could signal a managerial merry-go-round in pre-season.
Both Cooke and Roddy Collins have been linked with the vacant Brandywell hotseat, and whoever comes in will feel they have a squad that can challenge for next season's title.
Whether the new boss can keep hold of the likes of Simon Madden, Rory Patterson and Barry McNamee may well prove pivotal in Derry's attempt to win a first championship since 1997.