Football, like comedy, can be all about timing and Dundee certainly had the last laugh at Firhill.
With just six minutes to go in their crucial Premiership clash against Partick Thistle on Saturday, it looked anything but funny as the Dark Blues trailed 1-0 and were heading for a fourth consecutive defeat.
Had the scoreline stayed that way, the Jags would have jumped ahead of the Dens men in the table and there would have been just a four-point gap to bottom club Ross County.
However, a smiling Simon Murray then stepped on stage to wow his audience with a couple of perfectly-delivered goals to ensure the joke wasn’t on them this time.
Both of his celebrations were a joy to behold, with the former Dundee United man mobbed by teammates as he danced for joy in front of his fellow Dundee fans.
This was a smash-and-grab result but it was also perhaps justice done, what with Neil McCann’s men having thrown away what looked like certain victory at Kilmarnock last Tuesday and bossed the last meeting with the Jags in Maryhill in October only to chuck the three points away that time as well.
Striker A-Jay Leitch-Smith, who came on as a sub to lay on the first Dundee goal on 84 minutes, felt that Murray’s last-minute winner was maybe just what they deserved.
He said: “The roles were reversed from the last game here.
“We played a lot better than them the last time and ended up losing.
“This time they were better than us at the start but it worked out well for us.”
It certainly did and now some of the relegation fear and dread can be put to one side, at least for now.
They are now seven points clear of Ross County in bottom spot and manager Neil McCann was understandably a lot happier than he was just a few days earlier at Rugby Park.
“I think it was a reward for a relentless push to get the win,” said McCann.
“We weren’t just content in going for the point, which pleased me. It’s a great feeling in the dressing room just now.
“After Tuesday night, that is a much-needed good feeling.
“I had words with them at half-time as our midfield was too attached to the defence and they were getting joy down the right side.
“I thought we dominated the second half, although they were still a threat.”
As for goal hero Murray, McCann added: “I am so happy for Simon because I felt he was snatching at things since making his move here.
“He wanted to get off the mark and he needed that break.
“I was also delighted with A-Jay Leitch-Smith for the first one and then he was sniffing about for the second. The boys deserve it.”
Conor Sammon had given Partick the lead three minutes before half-time at Firhill but Murray levelled things on 84 minutes before netting the 90th-minute winner.
They were his first strikes for the club and absolutely flattened the home side, who had seemed on course to win.
The Dark Blues had rejigged their defence, with Darren O’Dea dropping down to the bench and Genseric Kusunga missing out through injury.
That meant places for Cammy Kerr, who took over the captaincy from O’Dea, and comeback man Josh Meekings.
After an opening spell bossed by the home side, on 10 minutes Roarie Deacon tried a shot from outside the box that Jags keeper Tomas Cerny had to push away.
A brilliant saving tackle from Meekings on 23 minutes stopped a likely Thistle goal when, from on the floor inside the box, the Dundee man flicked the ball away from Sammon just as he was about to shoot.
The hosts should have opened the scoring on 27 minutes when the ball broke to Martin Woods 12 yards out but he shot straight into the arms of goalie Elliott Parish.
On 31 minutes, Cerny had to pluck a curling shot from Murray out of the air after the Dark Blues frontman burst in from the left.
The Jags goalie did well again five minutes later when he dived at the feet of Mark O’Hara to prevent the midfielder sneaking the ball inside the near post.
Dundee were now enjoying a decent spell and Deacon sent a strike whizzing past from 30 yards.
It was Partick, though, who took the lead with just three minutes of the first half remaining.
Sammon was the scorer, prodding the ball past Parish from close range after Ryan Edwards had headed down a Mustapha Dumbuya cross from the right.
Just after the restart, Meekings saved his side again when he somehow prevented Sammon from shooting after the Jags player ran through on goal.
On 50 minutes, the Dens men had a decent chance when some acrobatics from Sofien Moussa saw the big man’s attempted overhead kick fall for Murray, who could only manage a fresh-air shot.
With an hour gone, there was a great escape for the Dens men when Chris Erskine was able to turn and shoot inside the box but Parish stuck out a leg to make a fine stop.
Dundee, who replaced Moussa with Leitch-Smith on 67 minutes, had an opportunity when the ball was floated towards Steven Caulker by O’Hara but the defender’s header flew wide.
A shot from O’Hara was deflected over as the visitors kept looking for a leveller.
With the clock showing 84 minutes, they duly got one.
Full-back Jon Aurtenetxe played in sub Leitch-Smith and his cross-shot landed perfectly for Murray, who slid the ball in at the far post.
Then, with just a minute left, Caulker was up for a corner and had an effort that hit two Thistle players before falling for Murray, who fought his way through the pack to nod into the net.