St Johnstone are all but certain to be in the play-offs.
The Perth side’s 1-1 draw with Livingston, combined with Dundee’s 2-0 defeat in Paisley, puts them six points clear of their Tayside rivals with the superior goal difference (seven better).
It was so nearly a third victory over Livingston this season.
Substitute Glenn Middleton had given Callum Davidson’s men the lead, which was only cancelled out in the 90th minute.
All in all, it was still a step in the right direction – both in terms of how they played and the bigger relegation picture.
Saints nearly conceded a goal in the opening minute against St Mirren last weekend but it was their turn to almost score with their first attack seven days later.
Stevie May, in for Nadir Ciftci, picked out Melker Hallberg on the overlap.
The Swede’s cross was met by Callum Hendry, who couldn’t keep his shot down from eight yards out.
The first half performance was much-improved from the meek one that sunk Saints’ chances of getting out of the play-off spot, with May dragging a shot past the post on 37 minutes at the end of a nice passing move.
Livi start second half better
It was the hosts who started the second period better, though.
And Zander Clark had to come to the rescue when Jamie McCart was caught flat-footed under an Ayo Obileye ball over the top.
Odin Bailey was through one v one and Clark won the duel by saving with his right foot.
The Perth keeper could only watch and hope for the best when an Alan Forrest curling shot just missed his far corner on 67 minutes.
After keeping Livingston at bay, Saints got themselves back on the front foot and broke the deadlock nine minutes later.
Rooney switched the play from right to left and James Brown – on for the injured Callum Booth – sent over a perfectly weighted inswinging cross to the back post where Middleton headed home.
The win that would have made Saints mathematically safe in 11th slipped through their fingers when Jack Fitzwater scored a 90th minute equaliser after Clark had saved a Scott Pittman header.
There were five minutes of stoppage time and in the third of those minutes, Hendry broke clear but made the wrong choice in shooting when he should have squared to Middleton.