Last updated on .From the section Scottish Cup

A late Don Cowie effort crept over the line to send Hearts into the fifth round of the Scottish Cup at the expense of Edinburgh rivals Hibernian.

Cowie touched on Christophe Berra's 87th-minute header, with the ball spinning in off John McGinn as he attempted a goalline clearance.

Moments before, Jon McLaughlin pushed over a fierce volley from Martin Boyle.

Hearts' Demetri Mitchell also had a powerful strike well saved by Ofir Marciano in an absorbing contest.

These city rivals were meeting at this stage of the tournament for the third year running, with Hibs, the 2016 winners, prevailing after a replay in the past two seasons.

Hearts threw their two new loan signings into the action from the start, Mitchell from Manchester United and the wily Steven Naismith from Norwich with understandable fanfare.

Naismith should have got his debut off to a delicious start with an early goal against the team that have inflicted considerable pain on Hearts in cup football in recent times. There were only four minutes gone when David Milinkovic picked out the Scotland forward, who careered through the middle of the Hibs defence.

Marciano came out to meet him, but Naismith went past the goalkeeper. Just when you thought he was going to make a dramatic start, he shot wide.

Steven Naismith looked sure to score just a few minutes into his Hearts debut

The last time the sides met it was the most dreary 0-0 draw imaginable and while this was no classic, it was intense and a different world to the previous borefests.

Midway through the half it was Hibs' turn to bemoan a missed opportunity. When Oli Shaw's cross from the right carried all the way to Boyle at the back post, the smart money was all on him putting it away but instead he poked the glorious chance wide.

Hibs had a spell when they got on the front foot but could not carve out much to show for it, unable break through the rock that is centre-back Berra.

Hearts began the match having not conceded a goal in 561 minutes and that extraordinary defensive record was stretched over the 10-hour mark as they reached half-time.

Hibs did have a chance through Boyle, but Hearts had one of their own through Isma Goncalves.

After the break, Hearts found another gear and enjoyed the best spell of the game. Full-back Mitchell, a growing influence as the game progressed, went through on the left side of the box but whacked his shot wide. Then, after meeting a cross on the half-volley, he forced an excellent save from Marciano.

Hearts captain Christophe Berra turned in a hugely impressive performance for the 2012 cup winners

A third chance came and it fell to Berra, whose powerful snapshot was directed straight at Marciano. Either side of the goalkeeper and the opener would surely have come.

Hibs manager Neil Lennon brought on Brandon Barker and then Simon Murray in an attempt to make his side an offensive threat again, but even a front four - with Shaw and Boyle still on the pitch - could not find their way through Hearts.

They came close, with Boyle's thumping volley having to be beaten away wonderfully by McLaughlin to keep them in it.

But you could sense the winner and Hearts' leader Berra both started it and was a critical force at the end of it.

His dominant clearing header got Hearts up the field and when a corner was floated over, Berra outmuscled the Hibs defence to head towards goal.

Cowie got a slight touch and while Marciano and McGinn scrambled to clear, the ball spun backwards over the line to give Hearts their first derby win in 10 attempts.

Tynecastle basked in the moment. After getting dumped from the cup by Hibs in the last two seasons, this was sweet for them. And deserved, too.