Kieran Marty Waters scored a vital late winner to maintain Bray Wanderers' survival push against Bohemians at Dalymount Park.
This 1-0 win means that Shelbourne are relegated while Bohemians remain in the mix to avoid the play-off spot as just two points now separates them, UCD and Bray going into the last game of the season.
Waters, scarcely in the game up until then, struck on 76 minutes.
Collecting Kevin O’Connor’s pass, the winger showed great feet to ride two challenges and then curl his shot into the net off the far post.
Waters might have added a second in the 89th minute but for a fine save by Dean Delany after O’Connor again played him in.
Bohs then had a shout for a penalty in stoppage time when Dinny Corcoran went down under a challenge from Shane O’Connor but their appeals were waved away by referee Paul McLaughlin.
With Bray unchanged from their first win in 15 games when beating Limerick last week, Bohs made just the one enforced switch with Darragh Reynor coming into central midfield in place of the injured Dave Mulcahy, who was presented with the club‘s player of the year award before kick-off.
And it was Reynor who had the first shot in anger, rifling wide from distance on four minutes.
A favourite training ground corner routine then almost came off for Bohs seven minutes later.
Karl Moore’s low delivery was dummied to set up Ryan McEvoy whose shot was deflected out for another corner off Jason Byrne.
Ismahil Akinade’s touch and delivery from the right flank was Bray’s chief attacking ploy,
Byrne just failing to connect with his fine cross on 22 minutes.
In a tight game, Bray didn’t get a first shot on target until 40 minutes as John Mulroy’s low drive had the sting taken out of his from Neil Yadolahi’s partial block to allow Delany easily gather.
In their best passage of play, Bohs then wasted the chance of the half on the blow of the break.
Luke Byrne, Reynor, Moore and Keith Buckley were all involved to carve Bray open down the left.
But Corcoran failed to apply the finish as he sliced his shot over the top when he should have scored.
Bohs upped the tempo on the resumption, McEvoy bringing an agile parry save from Darren Quigley with a 30-yarder just before the hour mark.
The woodwork saved Bray on 67 minutes when Corcoran rattled the crossbar after Quigley saved at the feet of Stephen Traynor.
And so Bray stave off automatic relegation for another season but Shels are left with the news that they will finish bottom of the league and return to the First Division in 2014.
Bohemians: Dean Delany; Derek Pender, Roberto Lopes, Neil Yadolahi, Luke Byrne; Keith Buckley, Darragh Reynor (Dave Scully 88), Ryan McEvoy, Karl Moore (Andy Mulligan 85); Stephen Traynor (Kevin Devaney 80); Dinny Corcoran.
Bray Wanderers: Darren Quigley; David Webster, Danny O’Connor (Daire Doyle 63), Shane O’Connor, Dean Zambra; Ismahil Akinade, Kevin O’Connor, Kevin Maher, Kieran "Marty" Waters; John Mulroy; Jason Byrne (Gary Dempsey 74).
Referee: Paul McLaughlin (Monaghan).