Match ends, Hamilton Academical 2, Heart of Midlothian 1.
Hearts replaced Hamilton Academical at the bottom of the Scottish Premiership after the Lanarkshire side recorded their first win since September.
New Tynecastle manager Daniel Stendel has now lost his first three matches, with his side three points adrift.
Hamilton's Mickel Miller smashed an opener into the top corner before setting up Will Collar for the second.
Oliver Bozanic headed home just under 10 minutes from full-time, but Hearts fell to a fourth straight defeat.
Craig Halkett came close with a looping header striking the bar, while Steven Naismith helped Hearts dominate the first half. But the Scotland striker was forced off injured at the break and Accies took advantage with two goals in eight minutes for a first win in 12 matches.
Hearts' miserable run has seen them take just one point from their last seven games, with an Edinburgh derby to come at Tynecastle on Boxing Day.
Naismith the turning point
Both managers said pre-match that a "scrappy" win would be acceptable over a good performance and no points and, with the stakes high in a relegation battle, this was never going to be a classic.
Hearts started strongly with the influence of Naismith visible for all to see. His link-up play with Uche Ikpeazu and Steven MacLean created a number of early opportunities, but the Accies defence stood firm.
Slowly the home side came into the game and George Oakley was denied on two occasions by fine saves from Joel Pereira.
There was no lack of effort from either side in the knowledge that the losing team would be bottom of the Scottish Premiership on Christmas Day.
Naismith, 33, was making only his ninth Hearts appearance of the season and the Scotland international came close with a header that was just wide.
At the other end of the age spectrum, 17-year-old Aaron Hickey was denied by the width of the woodwork as Hearts searched for their first goal under manager Stendel.
There was a blow for the large contingent of travelling fans at the start of the second half when Naismith failed to appear, with Jake Mulraney taking his place.
The home side could sense Hearts are a different team without the influence of the forward, and Accies capitalised when they snatched the lead.
Steve Davies and Oakley combined to set up Miller on the edge of the box and the striker rifled the ball into the roof of the net with Pereira helpless.
And with 16 minutes left Hamilton secured victory with a wonderful second. This time Miller provided a terrific cross from the left as Michael Smith attempted to see the ball out of play. The ball flew across the Hearts box with Collar taking a touch before hammering past Pereira.
Many Hearts fans had seen enough and headed towards the exits. Those who remained, however, missed the first goal scored under Stendel when Bozanic headed home a Glenn Whelan corner to give Hearts hope.
And MacLean came close to what would have been a dramatic equaliser - but he just couldn't gain enough purchase.
Man of the match - Mickel Miller
This could be a huge victory for Accies come the end of the season and the main man involved with both goals merits the award.
The strike from Miller for the opener was worthy of wining the game itself, but his cross from close to the touchline that allowed Collar to notch what proved to be the winner was sublime.
'We need to change things quickly' - reaction
Hamilton head coach Brian Rice: "I'm delighted for the boys. On the second-half performance we thoroughly deserved to win.
"There's nothing like winning - I said it when I walked in that it's been a long time since we've had this feeling, and let's try and use this to motivate us again."
Hearts manager Daniel Stendel: "After this game I would say we need to change things quickly. We need to play like we did for 50 or 60 minutes against Celtic, and how we did in the first half today. We need to show it in 90 minutes and we need to score."
- 2McGowanBooked at 77mins
- 7CollarSubstituted forHuntat 90+3'minutes
- 11MillerBooked at 79mins
- 9OakleySubstituted forEastonat 83'minutesBooked at 90mins
- 8DaviesSubstituted forSmithat 63'minutes
- 1Fon Williams
- 23Castro Pereira
- 26HalkettBooked at 70mins
- 2SmithBooked at 58mins
- 22DamourSubstituted forHendersonat 76'minutes
- 12WhelanBooked at 90mins
- 14NaismithSubstituted forMulraneyat 45'minutes
- 3WhiteSubstituted forBozanicat 61'minutes
- 18MacLeanBooked at 21mins
- David Munro
- Shots on Target
Second Half ends, Hamilton Academical 2, Heart of Midlothian 1.
Glenn Whelan (Heart of Midlothian) is shown the yellow card for a bad foul.
Foul by Glenn Whelan (Heart of Midlothian).
Johnny Hunt (Hamilton Academical) wins a free kick in the attacking half.
Jake Mulraney (Heart of Midlothian) wins a free kick in the defensive half.
Lewis Smith (Hamilton Academical).
Attempt saved. Steven MacLean (Heart of Midlothian) with an attempt from very close range is saved in the centre of the goal. Assisted by Craig Halkett.
Attempt missed. Craig Halkett (Heart of Midlothian) header from the centre of the box is close, but misses to the right. Assisted by Michael Smith with a cross.
Substitution, Hamilton Academical. Johnny Hunt replaces Will Collar.
Corner, Hamilton Academical. Conceded by Sean Clare.
Brian Easton (Hamilton Academical) is shown the yellow card.
Foul by Glenn Whelan (Heart of Midlothian).
Mickel Miller (Hamilton Academical) wins a free kick in the defensive half.
Offside, Heart of Midlothian. Jake Mulraney tries a through ball, but Steven MacLean is caught offside.
Foul by Craig Halkett (Heart of Midlothian).
Mickel Miller (Hamilton Academical) wins a free kick in the attacking half.
Attempt missed. Steven MacLean (Heart of Midlothian) header from the centre of the box misses to the right. Assisted by Jake Mulraney with a cross.
Substitution, Hamilton Academical. Brian Easton replaces George Oakley.
Goal! Hamilton Academical 2, Heart of Midlothian 1. Oliver Bozanic (Heart of Midlothian) header from very close range to the top left corner. Assisted by Michael Smith with a cross following a corner.