Hearts clocked up their first league win since November and moved onto positive points thanks to a late winner from Scott Robinson.
Callum Paterson gave Hearts a deserved lead in the 37th minute with a tap in following a David Smith corner but Yann Songo'o levelled on the stroke of half time when he headed home a Richard Brittain free-kick.
The match looked to be heading for a draw but with 10 minutes to go Robinson pounced on a Michael Fraser punch out to drill the ball into the net for a dramatic winner.
Hearts had a chance to take the lead after only 20 seconds when Songo'o lost possession of the ball and David Smith's cross to the far post was scooped wide by Sam Nicholson.
The visitors had another chance seconds later when Smith sent over an inviting delivery to the near post but Paterson knocked the ball past the wrong side of the post.
County's first effort of note arrived in the sixth minute when Graham Carey got behind the Hearts' defence but his whipped in cross was just missed by Brittain at the far post.
But most of the action was at the other end and Smith caused havoc again with another dangerous cross which Dale Carrick just failed to get enough purchase on.
Then Smith had a go himself with a low drive but his effort flashed past Michael Fraser's right hand post.
The visitors continued to set the pace and they came close again in the 24th minute when Smith played in Carrick but his shot flew into the side netting.
County were only seen in snatches but they were not far away five minutes later when a Carey free-kick was knocked back across goal by Yoann Arquin and Jordan Slew headed narrowly past the upright.
It looked just a matter of time before Hearts took the lead and the opener came in the 37th minute when Smith's corner from the left was touched on by Danny Wilson and the ball fell kindly for Paterson who tapped in with his left foot from a yard out..
But County hit back and against the run of play they grabbed a leveller in the dying seconds of the half when a Brittain free kick was headed home by Songo'o.
County started the second half on the front foot and Songo'o was up looking to get on the scoresheet again when he knocked one over the top following a corner.
Hearts missed a really good chance to restore their lead in the 73rd minute when Paterson won the ball and set Smith off down the right and his cross into the box was headed over by Carrick from six yards.
It was Carrick's last involvement in the action as he was immediately replaced by Billy King.
But Hearts did restore their lead 10 minutes from the end when Smith's ball into the box was only cleared as far as Robinson who fired home through a ruck of players.
Hearts could have been out of sight in the 86th minute when full back Kevin McHattie charged through the County defence only to be denied by a point-black save from Fraser.
County threw on Melvin De Leeuw and Alex Cooper in a desperate attempt to save the match but Hearts held out for all three points.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article