Dundee United leapfrogged Hearts into fifth place in the Scottish Premier League with a disciplined win at Tynecastle.
Jon Daly gave the visitors the lead on 41 minutes, heading past Jamie MacDonald four mintes before half-time.
That was against the run of play as Hearts started the brighter with Rudi Skacel and Stephen Elliot threatening.
Late in the match Gavin Gunning blocked on his own line before heading a second at the other end.
Hearts made a strong start, with both Skacel and Scott Robinson making Dundee United goalkeeper Dusan Pernis save.
The home side's early dominance continued and striker Elliot had an excellent chance to open the scoring, swivelling to shoot in the box.
But from a great position he hit the ball straight at Pernis, when a fraction either side of the goalkeeper would have left him helpless.
With 20 minutes played it was Gunning who called MacDonald into action for the first time, forcing the goalkeeper to tip over a header.
Ian Black also had a volley at Pernis, but there was not enough conviction in the strike to trouble the Slovak, who held comfortably.
Despite Hearts having the better chances, and dominating the midfield, United took the lead minutes before the break.
Barry Douglas delivered a good free-kick into the box and striker Daly stooped in front of Danny Grainger to head home his 17th goal of the season.
That goal was against the run of play, and Elliot was denied an equaliser deep into first-half stoppage time when he watched his cross-cum-shot headed off the line by United defender Robbie Neilson.
Hearts had claims for a penalty dismissed in the second half when Grainger was deemed to have gone down too easily under pressure from Willo Flood.
The dominance that Hearts had enjoyed in the first 45 minutes was being snuffed out by the visitors, who were playing well defensively, not allowing any service to reach Elliot.
If not for that defensive strength, United would have lost their lead 10 minutes from the end, with both Pernis and Gunning combining wonderfully to deny Skacel and Elliot respectively.
From Gunning preventing a near-certain goal in his own box, moments later the full-back popped up at the other end to power an unstoppable header into the top corner of the net to seal a fifth away win of the season for United.
Hearts manager Paulo Sergio : "We were very poor in our offensive set-pieces and poor defending set-pieces and that made all the difference.
"All the rest was Hearts. We had four or five very good chances.
"It's a disappointing result, but we are in the right direction, playing with desire. We have to score goals and be stronger in set-pieces."
Dundee United manager Peter Houston : "It was a brilliant result. We can play better, we didn't pass the ball as well as we can and the players agreed with me.
"It's a massive three points for us. It was a hard-earned victory, rather than being like the other night. We had to work very, very hard off the ball.
"At half-time we were 1-0 up and we hadn't really done an awful lot in the game.
"I don't think Dusan Pernis had a lot to do in the second half, although Hearts had more of the ball.
"I thought we defended exceptionally well and that's another clean sheet."
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The referee blows for the end of the match.90:00 +2:42
Willo Flood decides to take the corner short.90:00 +2:19
Mehdi Taouil concedes a free kick for a foul on Gary Mackay-Steven. Dusan Pernis restarts play with the free kick.90:00 +1:52
Jamie Hamill fouled by Gary Mackay-Steven, the ref awards a free kick. Jamie MacDonald restarts play with the free kick.89:46
The referee blows for offside against Gary Mackay-Steven. Free kick taken by Jamie MacDonald.88:51 Substitution
Substitution Richie Ryan replaces Scott Robertson.86:31
Barry Douglas sends in a cross, Gavin Gunning has a headed effort at goal from deep inside the area missing to the left of the target.86:31 Booking
Booking Suso Santana is shown a yellow card for unsporting behaviour.86:16
Unfair challenge on Gary Mackay-Steven by Suso Santana results in a free kick.84:36
Assist on the goal came from Gary Mackay-Steven.84:36 Goal scored
Goal! - Gavin Gunning - Hearts 0 - 2 Dundee U Gavin Gunning scores a headed goal from inside the box. Hearts 0-2 Dundee Utd.84:13
Outswinging corner taken from the left by-line by Gary Mackay-Steven,79:17
Corner taken by Jamie Hamill, Dusan Pernis makes a comfortable save.78:21
Outswinging corner taken by Daniel Grainger, Darren Barr takes a shot. Save by Dusan Pernis.76:56
Scott Robinson concedes a free kick for a foul on John Rankin. Free kick taken by Barry Douglas.73:45
John Rankin has an effort at goal and missed to the left of the goal.71:41
Free kick awarded for an unfair challenge on Gavin Gunning by Rudi Skacel. Dusan Pernis takes the direct free kick.69:21
The referee blows for offside. Indirect free kick taken by Dusan Pernis.66:09 Substitution
Substitution (Hearts) makes a substitution, with Andrew Driver coming on for David Obua.61:29
Stuart Armstrong concedes a free kick for a foul on Stephen Elliott. Free kick crossed by Jamie Hamill.
Daniel Grainger restarts play with the free kick.60:00 Booking
Booking Booking for Robbie Neilson for unsporting behaviour.59:52
Robbie Neilson challenges Scott Robinson unfairly and gives away a free kick.58:31 Substitution
Substitution Stuart Armstrong is brought on as a substitute for Johnny Russell.58:31
Unfair challenge on Gary Mackay-Steven by Suso Santana results in a free kick. Direct free kick taken by Barry Douglas.57:52
Gary Mackay-Steven gives away a free kick for an unfair challenge on Mehdi Taouil. Scott Robinson restarts play with the free kick.56:48
Jon Daly concedes a free kick for a foul on Ryan McGowan. Jamie MacDonald takes the free kick.55:44
Jamie MacDonald restarts play with the free kick.55:44 Booking
Booking Willo Flood goes into the referee's book for unsporting behaviour.55:33
Foul by Willo Flood on Daniel Grainger, free kick awarded.54:21
Daniel Grainger takes the outswinging corner, Gavin Gunning makes a clearance.50:47
Barry Douglas gives away a free kick for an unfair challenge on Rudi Skacel. The free kick is delivered left-footed by Daniel Grainger from right wing.49:21
Shot by David Obua from outside the box goes high over the crossbar.46:49
Daniel Grainger concedes a free kick for a foul on Robbie Neilson. Direct free kick taken by Dusan Pernis.45:30
Unfair challenge on Gary Mackay-Steven by Jamie Hamill results in a free kick. Barry Douglas takes the free kick.45:01
The referee starts the second half.45:01 Substitution
Substitution Suso Santana on for Marius Zaliukas.45:00 +5:02 Half time
Half Time The half-time whistle blows.45:00 +2:39
Corner taken left-footed by Daniel Grainger, John Rankin manages to make a clearance.45:00 +1:54
The offside flag is raised against Gary Mackay-Steven. Jamie MacDonald takes the indirect free kick.44:36
Rudi Skacel gives away a free kick for an unfair challenge on Willo Flood. Free kick crossed left-footed by Barry Douglas, clearance made by Jamie Hamill.44:00
The assistant referee flags for offside against David Obua. Free kick taken by Dusan Pernis.42:44
Corner taken by Daniel Grainger from the left by-line, clearance by Jon Daly.40:49
Assist by Barry Douglas.40:49 Goal scored
Goal! - Jon Daly - Hearts 0 - 1 Dundee U Jon Daly finds the net with a headed goal from inside the six-yard box. Hearts 0-1 Dundee Utd.40:13
Jamie Hamill concedes a free kick for a foul on Gary Mackay-Steven. Barry Douglas takes the free kick,39:08 Substitution
Substitution Ryan McGowan joins the action as a substitute, replacing Ian Black.35:51
Darren Barr challenges Jon Daly unfairly and gives away a free kick. Barry Douglas crosses the ball from the free kick right-footed from left channel, clearance made by Marius Zaliukas.30:44
The assistant referee flags for offside against Jon Daly. Marius Zaliukas takes the free kick.29:48
Johnny Russell takes a shot from inside the box clearing the bar.29:23
Ian Black produces a volleyed right-footed shot from 25 yards. Save by Dusan Pernis.28:43
Foul by Sean Dillon on Stephen Elliott, free kick awarded. Direct free kick taken by Ian Black.26:04
Foul by Jon Daly on Daniel Grainger, free kick awarded. Direct free kick taken by Marius Zaliukas.24:51
Shot from long range by Ian Black goes over the bar.19:27
Corner taken right-footed by Ian Black, clearance made by Jon Daly.17:55
Corner taken by Gary Mackay-Steven from the left by-line, Marius Zaliukas manages to make a clearance.17:17
Outswinging corner taken right-footed by Willo Flood from the right by-line, Gavin Gunning takes a shot. Save made by Jamie MacDonald.16:48
Free kick crossed by Willo Flood, clearance made by Marius Zaliukas.16:48 Booking
Booking Darren Barr is shown a yellow card.16:29
Darren Barr challenges Johnny Russell unfairly and gives away a free kick.14:06
The assistant referee flags for offside against Johnny Russell. Free kick taken by Jamie MacDonald.13:35
Jamie Hamill is penalised for handball and concedes a free kick. Barry Douglas takes the direct free kick.11:19
Stephen Elliott takes a shot. Save by Dusan Pernis.3:25
The referee blows for offside. Dusan Pernis takes the indirect free kick.2:59
Ian Black takes a short corner. Scott Robinson takes a shot. Save made by Dusan Pernis.1:40
Rudi Skacel takes a shot. Save by Dusan Pernis.0:00
The game gets underway.
Live data and text provided by our data suppliers