Hearts edged a bitter and breathtaking Edinburgh derby thanks to a late strike from Saulius Mikoliunas at Tynecastle.
The home side had earlier surrendered a two-goal lead as a Chris Killen header and a Dean Shiels penalty brought Hibs level.
But Shiels was sent off as he pole-axed Hearts goalkeeper Craig Gordon as he went to celebrate his equaliser.
Hibs had a chance after only 40 seconds when Hearts failed to deal with a free-kick but Abdessalam Benjelloun sent his shot wide.
Hearts went in front a minute later when Roman Bednar pounced on a long through ball and supplied a low cross for Paul Hartley to side-foot the ball home from five yards.
It was the perfect tonic for the home side who took the initiative from the start.
Hearts lost Jose Goncalves with an injury after only nine minutes but his replacement Lee Wallace slotted in well.
Killen forced an early save from Gordon but there was not enough power in his 14th minute shot.
Zbigniew Malkowski reacted well to save at the feet of Bednar shortly afterwards as the centre of Hibs' defence looked vulnerable.
The game was played at a frenetic pace and Killen should have done better midway through the first half when Michael Stewart sent him clear but he dragged his shot off target.
Edgaras Jankauskas had a chance late in the first half but his finish was tame and Hibs survived.
But the Lithuania striker was on target three minutes into the second half after an error from Malkowski.
He failed to deal with a Hartley free-kick with any conviction and Jankauskas had a simple chance to score the second.
Hibs were given a lifeline in the 55th minute when Killen powered in a header from Shiels' corner.
Shiels then equalised from the penalty spot after he was fouled by Nerijus Barasa but his follow through on Gordon sparked mayhem.
It left Mike McCurry with no option but the send the Hibs player off after the dust settled.
Hearts were back in front after 70 minutes when Mikoliunas cracked in a superb finish from the edge of the box after Hibs were slow to clear their lines.
Steven Whittaker hit the inside of the post with 13 minutes left as Hibs sought an unlikely equaliser but it was as close as the visitors came.