Shelbourne look to have secured a place in the InterToto Cup competition with this win at Oriel Park last night, but Finn Harps, with three games in hand, could still deprive them of third place in the league.
Dundalk, on the other hand, looked doomed to relegation for the first time in the club's history. Indeed, the club, with little support at the moment, could be facing even greater problems than relegation unless a miracle occurs.
Shelbourne, fielding a number of teenagers, were far from inspiring in this game that did not come to life until David Byrne flashed in a header at the near post from a Tony Sheridan corner kick to give the visitors the lead in the 34th minute.
Dundalk looked down and out when Dessie Baker was gifted a second goal by a static Dundalk defence just 40 seconds after the interval.
Hope flickered briefly in the 52nd minute when substitute David Martin scored a good goal.
For a while, the Shelbourne defence looked quite shaky and Shane Reddish went close to an equaliser with a shot that flashed over the bar minutes later.
That was the end of the home side's challenge, however.
DUNDALK: Henderson, Reddish, Crawley, McNulty, Brady, Melvin, Campbell, McGinity, Hoey, Ward, Brennan. Subs: Gollogley and Martin for Brennan and McGinity (52 mins), Dunne for Hoey (80 mins).
SHELBOURNE: Gough, Gleeson, Lubey, McCarthy, Scully, Byrne, D Baker, Fitzgerald, Sheridan, S Geoghegan, Kelly. Subs: O'Brien for Gleeson (69 mins), Carey for Lubey (75 mins).
Referee: J Feighery (Dublin)