Liam Craig scored the winner from the penalty spot with just eight minutes left as Hibernian beat Hearts 2-1 at Easter Road.
A crowd of 20,106 saw James Collins fire Terry Butcher's men in front on the hour mark but substitute David Smith hauled Gary Locke's team level.
Hibs skipper Craig made no mistake from the spot after Jordan McGhee had fouled Lewis Stevenson as the hosts moved into the top half of the Scottish Premiership.
Earlier in the day, Kris Boyd grabbed a last-minute winner as Kilmarnock leapfrogged St Mirren with a 2-1 victory at Rugby Park.
On-loan Newcastle striker Adam Campbell gave Saints the lead but Rory McKenzie equalised before half-time and Boyd won it for Killie.