Match ends, Kilmarnock 1, St Johnstone 2.
St Johnstone warmed up for next week's Scottish Cup semi-final by coming from behind to beat Kilmarnock in the Premiership.
Robbie Muirhead slid in to edge Killie ahead early on.
But Frazer Wright headed Saints level and Steven Anderson's inventive back-heel turned the match in the Perth side's favour.
And though Tommy Wright's side could not add to their lead, they go into the cup meeting with Aberdeen in fine form.
Killie might reckon they have blown the chance to ease their end of season play-off fears, especially since St Mirren pulled off a last-gasp win at home to Motherwell.
Kilmarnock were ahead inside four minutes thanks to their hot prospect Muirhead.
Kris Boyd's shot on the turn was saved by Saints 'keeper Alan Mannus but he couldn't hold on to the ball and the 18-year-old pounced on the rebound to stab home the opening goal.
Allan Johnston's team kicked on from that dream start and dominated the first half-hour with a slick passing display. What they lacked was end product.
The closest they got to increasing their advantage was a 25-yard lob from Alexei Eremenko which was just a couple of feet too high.
And at the other end Kilmarnock couldn't cope with corner kicks. They were well warned when a David Wotherspoon header from Lee Croft's corner was cleared off the line by Rory McKenzie.
But they didn't learn their lesson and from another corner kick St Johnstone squared the game on 31 minutes.
On the end of Croft's corner, Wright escaped his marker and crashed a header into the top corner of Craig Samson's goal.
Kilmarnock were found guilty again of failing to deal with a corner kick two minutes shy of half-time.
This time it was an in-swinger from Wotherspoon which found another central defender taking advantage of penalty box freedom to score. Anderson's goal was one for his scrapbook as he flew threw the air and back-heeled the ball past Samson.
In the second half St Johnstone were solid and Kilmarnock never really looked like salvaging something from the game.
And having looked early on as if they might move further clear of the playoff dogfight, the East Ayrshire side are now deeply embroiled again.
- 15BarbourBooked at 90mins
- 33MuirheadSubstituted forGrosat 77'minutes
- 20EremenkoSubstituted forGardyneat 73'minutes
- 28SlaterBooked at 86minsSubstituted forNicholsonat 90'minutes
- 12Reguero Chapinal
- 2MackayBooked at 90mins
- 17MaySubstituted forO'Halloranat 67'minutes
- Steven McLean
- Shots on Target
Second Half ends, Kilmarnock 1, St Johnstone 2.
David Mackay (St Johnstone) is shown the yellow card.
Foul by David Mackay (St Johnstone).
William Gros (Kilmarnock) wins a free kick in the defensive half.
Substitution, Kilmarnock. Barry Nicholson replaces Craig Slater.
Ross Barbour (Kilmarnock) is shown the yellow card.
Michael O'Halloran (St Johnstone) wins a free kick in the defensive half.
Foul by Ross Barbour (Kilmarnock).
Corner, Kilmarnock. Conceded by David Mackay.
Craig Slater (Kilmarnock) is shown the yellow card.
Foul by James Dunne (St Johnstone).
Michael Gardyne (Kilmarnock) wins a free kick in the attacking half.
Attempt saved. David Wotherspoon (St Johnstone) right footed shot from the right side of the box is saved in the centre of the goal.
Lee Croft (St Johnstone) wins a free kick in the defensive half.
Foul by Jeroen Tesselaar (Kilmarnock).
Attempt missed. Michael Gardyne (Kilmarnock) right footed shot from the centre of the box misses to the left.
Substitution, Kilmarnock. William Gros replaces Robbie Muirhead.
Attempt missed. Michael Gardyne (Kilmarnock) right footed shot from outside the box misses to the left.
Attempt missed. David Wotherspoon (St Johnstone) right footed shot from outside the box is close, but misses to the right.