Hearts lost their clean sheet record in controversial circumstances as Motherwell equalised in the sixth minute of stoppage time at Tynecastle.

The hosts were seconds away from keeping a ninth consecutive clean sheet but Motherwell scrambled the ball over the line after Craig Tanner's free-kick to secure a 1-1 Ladbrokes Premiership draw.

Curtis Main appeared to get a crucial final touch after Jon McLaughlin had stopped Tom Aldred's header on the line with referee Willie Collum giving the goal on the advice of his assistant after the hosts cleared.

David Milinkovic had opened the scoring in the 80th minute when he fired home after Andy Irving's free-kick from the right flank broke to him 12 yards out.

Hearts extended their unbeaten run to 12 games but will be frustrated at the manner of losing their first goal since Xavier Tomas netted for Hamilton in a 1-1 draw on December 2.

The visitors had not conceded in their previous two games in 2018 but Hearts gradually began to find some space in behind after the game started in blustery conditions in Edinburgh.

Trevor Carson pulled off an impressive reaction stop after Irving's cross was deflected goalwards and Anthony McDonald blazed over after skipping past Richard Tait inside the box.

Carson made a decent double stop from Steven Naismith and Ross Callachan and the visitors survived two penalty claims, the first for a handball appeal against Cedric Kipre and the second when the referee signalled Aldred had got the ball when felling Callachan.

Motherwell had first-half chances too. Main was flagged offside when flicking home Aldred's volley and later headed Nadir Ciftci's cross wide.

The hosts came closer moments before the break when left-back Demetri Mitchell cut inside from the right and curled a shot which bounced off the foot of the post.

Mitchell came close after the break too when he curled just over the top corner with his right foot. Carson had earlier saved from McDonald but Motherwell had a decent spell themselves.

Substitute Tanner was clean through after some slack passing but Hearts skipper Christophe Berra got back to force him off the ball inside the box. Main then failed to catch hold of his effort after being played in by Allan Campbell.

Hearts brought on Danny Amankwaa for a debut following his move from Copenhagen but it was another substitute who stole the show as Milinkovic netted his second goal in as many games.

Aldred headed wide from Tanner's stoppage-time free-kick but there was more drama to come moments later.