Match ends, Hamilton Academical 3, Heart of Midlothian 2.
Hamilton Academical ended Hearts' 100% league run after a pulsating and controversial match in Lanarkshire.
Billy King cancelled out Gramoz Kurtaj's first-half opener as the game swung from end to end.
But the turning point came when Hearts defender Callum Paterson was red carded for a two-footed lunge just minutes after he gave the visitors the lead.
Hamilton took full advantage through goals from Ali Crawford and Jesus Garcia Tena to take all three points.
Hearts not only lost the game but were knocked off the top of the Scottish Premiership by Celtic after the reigning champions' 3-1 win over St Johnstone.
As expected, both sides flew out of the traps full of confidence and the game was quickly swinging end to end.
Hamilton midfielder Crawford was first to have a pop at goal, but his fierce 20-yard effort was tipped past the post by Neil Alexander at full stretch.
Jamie Walker had a similar effort at the other end 15 minutes later - this time his volley was held by Michael McGovern at the second attempt.
But, as the clouds parted in Lanarkshire, it was the home side who started to dominate in the late summer sunshine.
Kurtaj should have given them the lead 10 minutes before the interval.
After a great through ball from Crawford, the German simply had to hold his nerve and pick his spot, but instead he was picking himself up off the pitch following a comedy stumble and mishit that he'll be keen to forget.
He made up for it just before the break, but there was still an element of comedic value courtesy of the Hearts defence.
Alim Ozturk failed to deal with what appeared to be harmless long ball, as did the outrushing Alexander, and Kurtaj took advantage, although his finish was less than convincing and the ball trickled into the back of the net.
Those in red and white jumped to their feet, those in Maroon were left with heads firmly in hands.
However, Billy King poked high past McGovern just after the break to level things and it looked like the Hearts tails were well and truly up.
Paterson blasted in at the back post to give Hearts the lead and the home fans must have thought their chance of an upset had gone. How wrong they would be.
Referee Willie Collum then flashed a red card to Paterson for a foul on Darian McKinnon.
Players crowded the officials, furious at just about everything, and referee Willie Collum started flashing yellow cards like confetti.
The sending off was to prove pivotal, though, because Crawford blasted in a stunning 25-yard equaliser just five minutes later and Tena fired past Alexander at the second attempt to give Hamilton the points.
- 24TenaBooked at 79mins
- 44De Lima Tagliapietra
- 3KurakinsBooked at 27mins
- 6GillespieBooked at 90mins
- 7ImrieSubstituted forNadeat 80'minutesBooked at 90mins
- 18MacKinnonBooked at 79mins
- 12KurtajSubstituted forDochertyat 90+5'minutesBooked at 90mins
- 14MorrisBooked at 32minsSubstituted forLongridgeat 90+1'minutes
- 2PatersonBooked at 77mins
- 18RossiBooked at 78mins
- 12KingSubstituted forNicholsonat 90'minutes
- 8BuabenBooked at 79minsSubstituted forReillyat 90'minutes
- 19Delgado Lloria
- 10SowSubstituted forMcGheeat 81'minutes
- William Collum
- Shots on Target
Second Half ends, Hamilton Academical 3, Heart of Midlothian 2.
Greg Docherty (Hamilton Academical) is shown the yellow card.
Substitution, Hamilton Academical. Greg Docherty replaces Gramoz Kurtaj.
Christian Nade (Hamilton Academical) is shown the yellow card for a bad foul.
Foul by Christian Nade (Hamilton Academical).
Alim Ozturk (Heart of Midlothian) wins a free kick in the defensive half.
Corner, Hamilton Academical. Conceded by Igor Rossi.
Corner, Hamilton Academical. Conceded by Juwon Oshaniwa.
Substitution, Hamilton Academical. Louis Longridge replaces Carlton Morris.
Substitution, Heart of Midlothian. Sam Nicholson replaces Billy King.
Substitution, Heart of Midlothian. Gavin Reilly replaces Prince Buaben.
Goal! Hamilton Academical 3, Heart of Midlothian 2. Jesus Garcia Tena (Hamilton Academical) left footed shot from the centre of the box to the high centre of the goal following a corner.
Corner, Hamilton Academical. Conceded by Alim Ozturk.
Attempt saved. Ali Crawford (Hamilton Academical) right footed shot from outside the box is saved in the bottom left corner.
Goal! Hamilton Academical 2, Heart of Midlothian 2. Ali Crawford (Hamilton Academical) left footed shot from outside the box to the top right corner.
Jesus Garcia Tena (Hamilton Academical) wins a free kick on the left wing.
Foul by Juanma (Heart of Midlothian).
Jamie Walker (Heart of Midlothian) wins a free kick in the defensive half.
Foul by Ziggy Gordon (Hamilton Academical).