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.