Hearts battled to victory over Kilmarnock to secure at least a Uefa Cup spot and increase their lead over Rangers to five points in second place in the SPL.
Edgaras Jankauskas and Roman Bednar went close for the home side early on but Hearts’ Christophe Berra was lucky not to be sent off for a trip when Danny Invincibile was breaking through.
It had been the first time this season that neither captain Steven Pressley nor Scotland colleague Andy Webster had featured in the Hearts defence.
Pressley was out with a back injury, but mystery surrounded the absence of Webster, who had turned down a new contract and was not even on the bench.
But Rudi Skacel, who was unhappy to be rested last weekend, returned to midfield at the expense of Deividas Cesnauskis.
Hearts’ new defensive pairing of Berra and Jose Goncalves were lucky not to concede early on when young player of the year Steven Naismith headed straight at Hearts goalkeeper Craig Gordon from ten yards.
The home side responded and fit-again Jankauskas, who had replaced Michal Pospisil up front, had a close-range drive brilliantly blocked by goalkeeper Alan Combe and strike partner Bednar somehow managed to fire over the bar from just six yards out with the goal gaping.
Bednar volleyed a difficult Takis Fyssas cross from wide on the left over the bar from 12 yards out as a Killie defence in which Gordon Greer had replaced Lindsay Wilson came under pressure.
Hartley fired a free-kick from 25 yards wide of the target, while Skacel exploded a drive from distance just over.
Goncalves hobbled off, to be replaced with Senegalese full-back Ibrahim Tall, who was given his debut after 25 minutes.
That appeared to unsettled Hearts and Berra seemed to click the heels of Invincibile as the Killie midfielder bore down on Gordon just before the break but referee Eddie Smith waved play on, leaving Killie boss Jim Jefferies in a rage on the touchline.
Hearts pressed after the break and Paul Hartley had already fired over from 12 yards before breaking the deadlock. The Scotland midfielder sent a 25-yard free-kick into the far corner of the net.
Then, in typical match-winning fashion for the Scottish Football Writers Association Player of the Year, Gordon saved superbly to block clear a Naismith effort from point-blank range.
But Berra made sure of the points, heading home from a Cesnauskis cross with three minutes to go.
Berra’s goal gave Hearts much-needed breathing space in second spot as two more home wins – against Celtic and Aberdeen – saw them clinch a Champions League spot.
Hearts: Gordon, Neilson, Berra, Goncalves, Fyssas, Mikoliunas, Hartley, Aguiar, Skacel, Jankauskas, Bednar.