This was a breathless, absorbing tussle that had the kind of ding-dong that those Brexiteers wanted to hear from Big Ben.

The clock was certainly ticking on Hearts’ hopes of salvaging something from this one but, in the very last knockings, Sean Clare produced a corker to earn a thrilling share of the spoils and lift Daniel Stendel’s team off the bottom of the table.

It had been a topsy-turvy afternoon and Stendel’s huffs and puffs of head-scratching mystification in his post-match summing up were understandable.

Hearts, fresh from last week’s rousing win over Rangers, had dominated the first half and were 2-1 up but were rent asunder after the interval as St Johnstone’s energy and industry thrust the hosts to the brink of a deserved victory.

“I will need some time to understand what happened in the second half,” gasped Stendel. “It was like we had different players on the pitch. We lost our ideas. At half-time I didn’t think I would be saying I’d be happy with a point but when you see the second half I am.”

His St Johnstone counterpart, Tommy Wright, was not content with the point and aimed a withering barb at the officials after the build-up to Clare’s equaliser started with a throw-in which should have been awarded to St Johnstone.

“It was a poor decision, the fourth official is right in front of it and he clearly says ‘blue, blue’,” he said. “The ref isn’t even in a position to give it but he over-ruled him. Why he isn’t listening to his fourth official I don’t know. It’s beyond comprehension that can happen.”

Hearts, who had not won in the league in Perth since 2010, had made most of the early running but it was the hosts who got their noses in front on 17 minutes. Chris Kane’s donkey work on the right sent Ali McCann scampering into the box and his cut-back was trundled into the bottom corner by Stevie May.

The response by Hearts was robust, though, and they clattered St Johnstone with a quick double-whammy. On 26 minutes, Liam Boyce diverted Toby Sibbick’s inviting low cross into the net. Four minutes later,

Zander Clark made a right hash of a cross and John Souttar hooked the loose ball towards the goal before Steven Naismith’s head applied the finishing touch.

The turnaround in fortunes after the break was startling. Charging at a stunned Hearts like the 7th Cavalry, the hosts levelled on 52 minutes when May’s lay-off was guided home by the terrific McCann. Tony Ralston then rattled the bar before May put St Johnstone ahead from the penalty spot just after the hour following Craig Halkett’s illegal dunt on Jason Kerr.

May almost put the tin lid on affairs in the last minute with a remarkable 45 yarder which was parried by the back-pedalling Hearts keeper. There was still time for a final twist and Clare pounced on a loose ball on the edge of the box and drilled home to rescue a precious point.