Scottish Premiership Wrap: Hearts shock Aberdeen, Celtic extend lead
Hearts, who occupy bottom place in the table, had only won twice in the top flight prior to Saturday's victory, but recovered well from Niall McGinn's 26th-minute opener.
Barry Robson was shown a second yellow card 10 minutes after the break, with the dismissal proving a turning point, as Hearts scored three times in 24 minutes through Jamie Walker, Callum Paterson and Ryan Stevenson.
It brought Derek McInnes' side's three-game winning league run to an end, with leaders Celtic taking full advantage by beating Ross County 4-1 to move five points clear.
Braces from Virgil van Dijk and Joe Ledley either side of an Ivan Sproule goal eight minutes after the hour were enough to maintain Celtic's unbeaten league record.
Inverness took full advantage of Aberdeen's slip up to move second, seeing off Hibernian 2-0 thanks to goals in 18 minutes from Nick Ross and Billy McKay in front of the watching Terry Butcher.
Butcher is set to swap a managerial position with Inverness for one with Hibs in the coming days.
St. Johnstone are fifth after a 3-1 win over Kilmarnock, while Dundee United were comfortable 4-0 winners over Motherwell at Fir Park.
St. Mirren picked up their third win in four league games, condemning Partick Thistle to a third straight defeat in the process.
Conor Newton's 72nd-minute goal was sandwiched in between a Steven Thompson brace, with Stephen O'Donnell sent off 20 minutes from time for the hosts in their 3-0 defeat.