Motherwell are within touching distance of a spot in next season's Champions League qualifiers after Michael Higdon's winner against Hearts.
Higdon was on hand for a cool finish after goalkeeper Jamie MacDonald failed to hold a Jamie Murphy drive after 29 minutes at Tynecastle.
Hearts had been the better side until then and they recovered their composure to create more in the second-half.
But Well held on to go eight points clear of Dundee United.
The Tannadice team must now beat Rangers on Wednesday to prevent Stuart McCall's side clinching at least third spot in the Scottish Premier League.
Paulo Sergio, whose Edinburgh side were looking to overtake St Johnstone into fifth place, had decided to give fit-again David Templeton and Mehdi Taouil some match practice with the Hearts manager's thoughts on the Scottish Cup final.
Rudi Skacel and Andrew Driver dropped out along with injured striker Craig Beattie.
Stephen Elliott was given the job of leading the line and immediately fired a shot wide, Suso sent in a dangerous cross flashing across the face of goal, while Darren Barr fired wide from 30 yards as the visitors started brightly.
Elliott looked to be clipped late by Keith Lasley inside the penalty box, but there were no appeals for a spot kick from the visitors.
Motherwell were being confined to long balls and the occasional quick break, during one of which Murphy ghosted past a statue-like Andy Webster but had his shot across the goal blocked cleared.
Templeton's trickery made some room for a shot inside the box, but Taouil ought to have done better than skew his drive wide from 15 yards after the ball squirmed into his path off a good Shaun Hutchinson block.
Murphy was the only threat coming from Motherwell and it was no surprise that the opener arrived from one of the forward's thrusting runs.
He cut inside and delivered a low drive that MacDonald could only push one-handed straight out into the path of Higdon, who curled it round defender Marius Zaliukas and into the corner of the net from 16 yards.
Hearts not only fell behind but out of the game and Sergio only gave Taouil until the half-time break to impress, with Skacel coming into the action.
The first good chance of the second half fell to Templeton, but Hutchinson's well-timed last-ditch tackle took the sting out of the winger's 15-yard drive straight at goalkeeper Darren Randolph.
Hearts were back in control and went agonisingly close when Danny Grainger's curling free-kick was flicked towards goal and just wide of the far post off the head of Barr.
Another Murphy run inside set up Lasley 22 yards out and the midfielder's low drive deflected off the toe of Zaliukas and just wide.
Hearts broke from the resulting corner and, although Suso aimed a sublime volley into the far corner of the net from just inside the penalty box, the effort was correctly ruled offside.
Skacel threatened with a powerful header, but Randolph made the near-post save look easy, and Templeton shot wastefully into the side-netting as Well survived late pressure to secure an important victory.
Heart of Midlothian
- 30 MacDonald
- 03 Grainger
- 05 Barr
- 06 Webster
- 17 McGowan
- 26 Zaliukas
- 07 Santana
- 08 Black (Driver - 77' )
- 12 Templeton
- 21 Taouil (Skacel - 46' )
- 10 Elliott (Glen - 76' )
- 28 Ridgers
- 11 Driver
- 19 Skacel
- 35 Prychynenko
- 18 Novikovas
- 23 Glen
- 27 Robinson
- 01 Randolph
- 03 Hammell
- 15 Hutchinson
- 22 Clancy
- 04 Law
- 06 Hateley
- 07 Humphrey (Daley - 82' )
- 08 Jennings
- 14 Lasley
- 09 Higdon
- 11 Murphy (Ojamaa - 78' )
- 12 Hollis
- 02 Saunders
- 05 Craigan
- 20 Page
- 17 Daley
- 18 Forbes
- 24 Ojamaa
Live Text Commentary
Full Time The referee ends the match.87:10
Free kick awarded for a foul by Omar Daley on Suso Santana. Daniel Grainger takes the indirect free kick.85:53
Foul by Ryan McGowan on Stevie Hammell, free kick awarded. Indirect free kick taken by Darren Randolph.84:02
Free kick awarded for an unfair challenge on Suso Santana by Omar Daley. Daniel Grainger shoots direct from the free kick.82:59
The assistant referee signals for offside against Rudi Skacel. Darren Randolph takes the indirect free kick.81:35 Substitution
Substitution Omar Daley comes on in place of Chris Humphrey.80:12
Gary Glen concedes a free kick for a foul on Tim Clancy. Free kick taken by Stevie Hammell.79:42
Rudi Skacel takes a shot. Darren Randolph makes a save.77:42 Substitution
Substitution Jamie Murphy leaves the field to be replaced by Henrik Ojamaa.75:49 Substitution
Substitution Andrew Driver on for Ian Black.75:49 Substitution
Substitution Gary Glen comes on in place of Stephen Elliott.75:49
The assistant referee flags for offside against Stephen Elliott. Darren Randolph restarts play with the free kick.73:00
The assistant referee signals for offside against Suso Santana. Darren Randolph restarts play with the free kick.71:43
Keith Lasley takes a shot. Marius Zaliukas gets a block in. Corner taken by Tom Hateley from the left by-line, save by Jamie MacDonald.69:03
Unfair challenge on Shaun Hutchinson by Stephen Elliott results in a free kick. Indirect free kick taken by Darren Randolph.68:26
Michael Higdon challenges Marius Zaliukas unfairly and gives away a free kick. Marius Zaliukas takes the indirect free kick.67:14
Jamie Murphy is flagged offside by the assistant referee. Indirect free kick taken by Jamie MacDonald.66:33
Ian Black challenges Keith Lasley unfairly and gives away a free kick. Free kick taken by Tom Hateley.65:49
Free kick awarded for a foul by Darren Barr on Keith Lasley. Indirect free kick taken by Keith Lasley.64:41
Corner taken by Daniel Grainger from the right by-line, clearance by Steve Jennings.
Shaun Hutchinson gives away a free kick for an unfair challenge on Stephen Elliott. Free kick taken by Ian Black.63:07
The offside flag is raised against Stephen Elliott. Indirect free kick taken by Darren Randolph.61:06
Outswinging corner taken right-footed by Tom Hateley from the right by-line, Andy Webster makes a clearance.59:39
Tim Clancy concedes a free kick for a foul on Rudi Skacel. Daniel Grainger takes the direct free kick. Darren Barr has a headed effort at goal from close range which goes wide of the left-hand upright.59:06
Tom Hateley concedes a free kick for a foul on David Templeton. Daniel Grainger restarts play with the free kick.58:21
Foul by Stephen Elliott on Tim Clancy, free kick awarded. Tim Clancy takes the indirect free kick.57:48
Rudi Skacel produces a left-footed shot from the edge of the box and misses to the right of the goal.55:55
David Templeton takes a shot. Save made by Darren Randolph.55:05
Shot on goal by Suso Santana from just inside the area goes over the target.52:25
The official flags Stephen Elliott offside. Darren Randolph takes the free kick.50:04
The assistant referee flags for offside against Daniel Grainger. Darren Randolph takes the free kick.49:16
Darren Barr fouled by Stevie Hammell, the ref awards a free kick. Free kick taken by Andy Webster.45:01
The match restarts for the second half.45:01 Substitution
Substitution Rudi Skacel on for Mehdi Taouil.45:00 +0:32 Half time
Half Time The referee blows for half time.44:59
Free kick awarded for a foul by Andy Webster on Keith Lasley. Darren Randolph restarts play with the free kick.44:12
Michael Higdon concedes a free kick for a foul on Andy Webster. Free kick taken by Andy Webster.43:45
Mehdi Taouil gives away a free kick for an unfair challenge on Keith Lasley. Darren Randolph restarts play with the free kick.41:41
Michael Higdon challenges Marius Zaliukas unfairly and gives away a free kick. Jamie MacDonald takes the indirect free kick.41:14
Effort from range distance by Darren Barr goes wide of the right-hand upright.40:47
Steve Jennings gives away a free kick for an unfair challenge on Ian Black. Indirect free kick taken by Daniel Grainger.39:24
The referee gives a free kick against Ian Black for handball. Indirect free kick taken by Darren Randolph.36:28
Unfair challenge on Keith Lasley by Ian Black results in a free kick. Tom Hateley has a direct shot on goal from the free kick.35:21
Foul by David Templeton on Tim Clancy, free kick awarded. Darren Randolph takes the indirect free kick.28:41
Assist on the goal came from Jamie Murphy.28:41 Goal scored
Goal! - Michael Higdon - Hearts 0 - 1 Motherwell A goal is scored by Michael Higdon from inside the penalty box to the bottom left corner of the goal. Hearts 0-1 Motherwell.28:12
Jamie Murphy takes a shot. Save by Jamie MacDonald.26:37
Michael Higdon gives away a free kick for an unfair challenge on Darren Barr. Indirect free kick taken by Andy Webster.25:02
Free kick awarded for a foul by Stephen Elliott on Tim Clancy. Darren Randolph takes the free kick.23:03
Effort from a long way out by Ian Black goes wide right of the target.21:25
Free kick awarded for an unfair challenge on Suso Santana by Stevie Hammell. Indirect free kick taken by Andy Webster.19:12
Jamie Murphy has an effort at goal from just outside the penalty box which goes wide of the left-hand post.18:24
Free kick awarded for a foul by Keith Lasley on David Templeton. Ian Black restarts play with the free kick.17:39
Shot by Mehdi Taouil from deep inside the penalty area misses to the right of the target.15:51
Ian Black takes a shot. Save by Darren Randolph.13:31
Foul by Steve Jennings on David Templeton, free kick awarded. Ian Black restarts play with the free kick.9:52
Michael Higdon takes a shot. Save by Jamie MacDonald.9:21
The referee blows for offside. Darren Randolph takes the indirect free kick.6:26
Effort on goal by Darren Barr from long range goes harmlessly over the bar.5:43
Jamie Murphy is caught offside. Indirect free kick taken by Andy Webster.4:09
Inswinging corner taken right-footed by Tom Hateley from the right by-line, clearance by Marius Zaliukas.3:26
Tom Hateley challenges David Templeton unfairly and gives away a free kick. Ian Black takes the free kick.2:20
Jamie Murphy takes a shot. Save by Jamie MacDonald.1:31
Effort from outside the penalty box by Stephen Elliott goes wide right of the goal.0:00
The referee gets the match started.
Live data and text provided by our data suppliers