Hearts gave their hopes of playing European football a major boost with a convincing Scottish Premier League win over sixth-placed St Johnstone.
Midfielder Rudi Skacel provided a cool finish to Ryan McGowan's cutback to open the scoring after 21 minutes.
Callum Davidson had a drive tipped over by home keeper Mark Ridgers and his team-mate Cillian Sheridan shot wide.
But Andy Webster slid in Hearts' second after the break and his fellow defender Marius Zaliukas hit the post.
The result means Hearts are now in fifth place, two points ahead of the Perth side with a match to play.
A Scottish Cup win against Hibernian in two weeks' time, though, would mean one preliminary round fewer for Hearts to negotiate than making the Europa League qualifiers through their league placing.
Hearts were first to register an attack of note when, in the sixth minute, Andy Driver showed a glimpse of the form that once excited international managers on either side of the Scotland-England border.
He shimmied his way through the Saints defence, cut inside and smacked a near-post shot that Alan Mannus had to be sharp to save.
Sheridan headed a few feet wide when he leapt higher than the Hearts defence, with home keeper Ridgers flapping at fresh air.
The breakthrough came when Czech Republic midfielder Skacel scored his 16th of the season by finishing off a fine McGowan run and cutback with a confident first-time slap of his left boot.
A few minutes later a Danny Grainger corner was headed at goal by Webster, Mannus made the save and Skacel blasted the rebound into the stand when many would have fancied him to bury it.
St Johnstone found some respite as the half progressed and it took Hearts midfielder Ian Black to make a block on the goalline when Steven Anderson's downward header was diverted towards the net by Murray Davidson.
Buoyed by setting up Hearts' opener, McGowan pestered the Saints defence again when he got forward to take Black's pass but knocked the ball wide instead of cutting the ball back once more.
And Zaliukas squandered a glorious chance to make it 2-0 when he raced on to Black's corner but knocked the ball wide with his face when a header on target would have been hard to stop.
As an entertaining first half swung to the other end, Callum Davidson's drive was tipped over by Ridgers.
After the break Ridgers caused a moment of panic when he parried an excellent Jody Morris drive into the air before catching it just before it crossed the line.
Hearts moved two in front in 57 minutes when a typically accurate in-swinging Grainger delivery was prodded home by Webster who had evaded his marker.
Soon after, Zaliukas did connect properly with a Black corner and was unlucky to see it bounce off the post.
Former Hibernian favourite Derek Riordan was given a hot reception when he replaced Saints midfielder Chris Millar and it was not long before he showed his value to his new team.
Riordan's corner from the left provided Sheridan with a chance to nod home and as the ball bobbled around he had a shot deflected for another of his corners, which should have been headed home by Marcus Haber.
But Hearts looked the stronger team over the piece and were worthy winners.