There was heartbreak for Galway United tonight as they make the drop to the First Division of the SSE Airtricity League next season despite a brave second-half comeback.
The one remaining issue in the league season was settled tonight after Galway's despairing 4-3 defeat, meaning they will join already relegated Finn Harps and Drogheda United in the First Division for next year.
They lost thanks to a Dundalk goal courtesy of Michael Duffy in injury time after a brave fightback by the men from the west from trailing 3-1 at half time.
Duffy's strike came just minutes after Galway striker Ronan Murray dragged the home side level on 3-3 with two minutes to go and substitute Padraic Cunningham hit the post just moments before.
The bulk of the pressure was on United for whom nothing less than a win at Eamonn Deacy Park was required tonight and even then they needed either St Patrick’s Athletic or Sligo Rovers to lose.
However, Shane Keegan's side lost despite opening the scoring through Stephen Folan who pounced on a corner that the away side failed to clear.
Their lead only lasted two minutes as the rebound from a great save by the Galway goalkeeper Conor Winn came off Niclas Vemmelund and went into the net.
Stephen Kenny then saw his side begin to dominate in the middle of the field and their superiority finally told as Jamie McGrath and Patrick McEleney scored in the five minutes before the break to make it 3-1 at half-time.
The home side came out a different team after the break as they took the game to Dundalk and it paid off after seven minutes when midfielder Rory Hale was set up by Eoin McCormack to bury it into the corner past Gary Rogers.
They kept pressing for more and were rewarded on the 88th minute with Murray's goal, but their hopes were quickly dashed by Duffy's injury-time strike which sends them down to the First Division.
Sligo Rovers and St Pat's only needed a draw in their games to avoid relegation, and they both duly came up with the goods to stay up, Sligo drawing 0-0 at Drogheda and St Pat's earning a point at the Brandywell.
Killian Brennan put St Pat's 1-0 ahead against Derry City halfway through the first half only for the home side to get an equaliser just after the break through Rory Patterson.
Champions Cork City won 1-0 through Conor McCormack against Bray at Turner's Cross.
Bohemians beat Finn Harps 3-1 while it finished with a win for Shamrock Rovers 2-1 at home to Limerick FC.