Shamrock Rovers will play in the Intertoto Cup next season after securing the required victory over Longford Town at Richmond Park this afternoon.
The Hoops went ahead on the stroke of half-time through Stephen Grant and doubled that lead after the break when winger Shane Robinson found the net.
But Longford staged a remarkable comeback inside the last ten minutes to pull the game level. Eric Lavine and Adrian Murphy struck within a minute of each other.
However, Rovers secured their place in Europe in the dying seconds when striker Trevor Molloy converted a penalty after Vinny Perth had handled in the box. The Longford man was sent off for the offence.
Cork City lost their unbeaten home record in the league with a 1-0 defeat at the hands of UCD.
Cork needed to win and hope Rovers lost or drew with Longford to leapfrog the Dubliners in the race for the Intertoto place.
But Paul Doolin's UCD side made the breakthrough on 44 minutes when, against the run of play, Alan Gallen steered Robert Martin's corner past Michael Devine in the Cork net.
Cork manager Liam Murphy tendered his resignation after the game.
Drogheda United, beset by financial worries, will contest the relegation play-off against Cobh Ramblers after drawing 0-0 at home to St. Patrick's Athletic.
The draw left Harry McHugh's side needing favours of unrealistic proportions. Bohemians would have needed to beat Derry by eight goals and Cork overcome UCD by 11 for the Louth team to avoid the play-offs.
Champions Bohemians drew 2-2 at home with Derry City.
In the first division, Dave Hill's Cobh Ramblers secured a play-off place with a last minute winner against Galway United.
eircom League Premier Division
Bohemians 2-2 Derry City
Cork City 0-1 UCD
Drogheda Utd 0-0 St Patrick's Athletic
Shamrock Rovers 3-2 Longford Town
- Shamrock Rovers win Intertoto Cup spot, Drogheda to contest relegation play-off with Cobh Ramblers.
eircom League First Division
Cobh Ramblers 2-1 Galway United
Dublin City 2-1 Athlone Town
Finn Harps 3-1 Sligo Rovers
Kilkenny City 2-2 Dundalk
Monaghan United 0-4 Kildare County
Waterford United 1-0 Limerick
- Cobh to play Drogheda in promotion play-off