An unaccountable brain freeze from St Mirren substitute Ryan Flynn, the most experienced player on the pitch and now a member of the club’s coaching staff, in the penultimate minute of stoppage time has almost certainly cost the Paisley club a place in Europe for the first time since 1987.
The 34-year-old midfielder had been brought on in the 89th minute to use his experience to help see the game out. Unfortunately for him, when Josh Ginnelly controlled a long punt forward on his chest, he was moving out of the penalty area when Flynn got too close to him and needlessly knocked him to the ground.
Lawrence Shankland confidently despatched the inevitable spot-kick for his 26th goal of the season, earning ten-man Hearts a point they barely deserved after being outplayed for most of this encounter.
Remarkably, they remain in fourth place in spite of winning just one of their last nine matches.
“We’re still in it and that’s the main thing,” said interim Hearts manager Steven Naismith.
“With the way the other results went it's okay but the first half was really frustrating because it was nowhere near good enough for the expectations of this club.
“In the second half you see, with nothing to lose, the boys make brave decisions in key moments and that gets us back in the game. Then we have the desire to play for 95-96 minutes and we come away with something that gives me hope.”
Andy Halliday, filling in at left-back for the suspended Alex Cochrane, was fortunate to escape without sanction following a high, late and dangerous challenge on home midfielder Greg Kiltie in only the tenth minute.
That decision, or lack of one, from referee David Dickinson set the tone for an unimpressive display by the official.
Kye Rowles was cautioned seven minutes later for grabbing Adam Greive’s shirt after the New Zealand striker had turned his marker.
Saints had the ball in the net after 27 minutes when Alex Gogic forced Ryan Strain’s delivery over the line from point-blank range but assistant referee Gordon Crawford had raised his flag for offside before the Cypriot had made contact.
The hosts were well on top by this stage and thoroughly merited the goal which finally came their way.
Scott Tanser’s corner to the far post was headed back across goal by Gogic and Joe Shaughnessy emphatically volleyed home from a few yards out.
Curtis Main was played in by Greive but Hearts goalkeeper Zander Clark thwarted the Englishman with a superb reflex save to beat his netbound drive away.
Even so, the Buddies doubled their advantage in spectacular style in first-half stoppage time. James Hill pole-axed Mark O’Hara and, from the resulting free-kick, Strain’s stunning strike beat Clark at his right-hand post from 25 yards.
After the break Clark made another acrobatic save to turn over a dipping 20-yarder from Kiltie and bettered it by pushing away a powerful header from Shaughnessy.
Naismith’s men conjured up a goal out of nothing when Atkinson hit the by-line and his low cross was fired home by Josh Ginnelly.
Just four minutes later they found themselves reduced to ten men when Peter Haring was shown a straight red card for a cynical foul on O’Hara.
“I personally disagreed with it,” said Naismith. “I thought it was a foul to stop the game during a counter attack. It was right in front of me, I didn't think it was aggressive and even the speed I don't think is excessive. The foul for their second goal, I don't agree with. Hilly just goes and wins the ball yet we get given a foul against us and it cost us. The equaliser? I think it could be a penalty. How VAR works, who knows?”
With Hearts forced to chase an equaliser, Saints were able to hit on the counter and substitute Thierry Small was also foiled by Clark. The failure to claim that third goal would come back to bite them.
Saints are sixth, three points behind Hibernian and four adrift of yesterday’s opponents and manager Stephen Robinson was inconsolable afterwards.
“I haven’t seen a replay of their penalty,” he said. “Whether [Ginelly's] been clever or not, it’s tough to take either way. The game should’ve been done and sealed against ten men but we played with a little bit of fear.
“We made the right substitutions with bookings and injuries - Ryan Strain had cramp - and they adjusted to the speed of the game.
“It feels like a defeat but when we’re disappointed with a point against Hearts it tells you how far St Mirren have come.”