Callum Paterson scored an 86th-minute equaliser as Hearts came from two goals down to earn a 3-3 draw at Hamilton.
Jamie Walker gave Hearts an early lead but Ali Crawford levelled with a 25-yard free-kick, his third goal against former club Hearts in 15 months.
Rakish Bingham netted his first two goals for Accies after the break but Walker pulled one back from the spot before Paterson notched his sixth goal of the season.
Both sides played 3-5-2 formations with former skipper Alim Ozturk replacing the suspended Igor Rossi for Hearts, who had already threatened through Tony Watt before taking an eighth-minute lead.
Bjorn Johnsen did well to hook a cross in from the left which Dougie Imrie headed away as two Hearts players closed in. The ball fell invitingly for Walker, who smashed a first-time shot high into the corner of the net from 18 yards.
Walker had another strike after a misplaced pass from Dan Seaborne and Hearts looked comfortable until midway through the first half.
Gramoz Kurtaj turned Imrie's sliced diagonal ball into an opportunity and got there ahead of Jack Hamilton before crossing for Bingham. The goalkeeper was stranded but John Souttar cleared the header off the line.
Accies were soon level in the 24th minute after Prince Buaben fouled Imrie. Crawford curled the ball over the wall into down into the corner of the net.
The midfielder soon had a great chance after Kurtaj played him clean through but he produced a weak effort straight at the goalkeeper.
Johnsen had three chances to put Hearts back in front before the break but only got one on target and Gary Woods made a brilliant one-handed diving stop.
Accies made Hearts pay 13 seconds after the restart. The hosts quickly got the ball forward and Crawford helped it on to put Bingham through. The former Hartlepool striker kept his composure and slotted home from 16 yards.
Woods made two good stops around the hour mark, beating away Paterson's scissors-kick and then blocking from Ozturk from point-blank range.
Bingham produced a sublime finish in the 68th minute to extend Accies' lead, beating Hamilton at his near post after Kurtaj had slipped the ball into the left channel.
Hearts got a lifeline five minutes later when Seaborne slid in to try to prevent Don Cowie latching on to Johnsen's knockdown and caught the Hearts player as he landed. Referee Steven McLean pointed to the spot and Walker squeezed the ball in off the post despite Woods getting a hand to it.
Kurtaj glanced a header just wide and Walker almost completed a hat-trick in spectacular style, but saw his 25-yard curler hit off the junction of post and bar before Woods saved Paterson's follow-up header.
But the Scotland right-back had the last laugh, running on to Perry Kitchen's pass, beating a man and slotting just inside the post from 18 yards.