Dundee manager Tony Docherty hailed the spirit of his players after captain Joe Shaughnessy’s header deep into stoppage time secured a 2-2 draw at Rugby Park.

Dundee had taken a first-half lead through Luke McCowan’s sublime low finish but Kilmarnock’s Joe Wright levelled things with five minutes remaining.

In a crazy climax, Rory McKenzie fired the home side ahead in the third minute of added time before Shaughnessy headed home Owen Beck’s corner two minutes later to ensure the match ended in a draw.

Docherty was pleased with the combination of grit and quality shown by his side.

He said: “We saw it at Dens against Kilmarnock and in the last seconds against Ross County and then today.

“That epitomises the squad that I’ve got and especially my captain Joe Shaughnessy. It’s that mentality that there is, that spirit in the team.

“When the dust settles that could be a huge point in our season.

“We’ve had a real consistent level of performance – probably outwith the Old Firm games.

“We’re a competitive team and when you display the ability level that we did in the first half and you ally that to the spirit and mentality to score a goal in the last seconds of the game, I think that’s a good recipe.

“I thought it was very much a game of two halves. I thought in the first half we were outstanding. We just needed that second goal but our level of performance was outstanding.

“I knew they were going to throw everything at us in the second half and they did. Up until four minutes to go, we had withstood that pressure.

“I was gutted we lost the goal and then the second goal goes in, but I can’t criticise these boys because what a mentality they have got.”

Killie boss Derek McInnes was proud of his players for their reaction after a poor first half, though he admitted the sucker punch at the death was “sore”.

He said: “The game is never over until its over. We lost a similar goal late on at Dens – a mistake as well.

“I thought Dundee were good value for their half-time lead. I thought they were better than us. I thought they were brighter than us and I thought they got to the pace of the game better than us.

“As good as Dundee were first half, I thought we were equally good – if not better – second half. I thought we kept asking the question, we arrived in good areas and we moved the ball well.

“I’m really pleased with the level of performance but more so the level of character. It was sheer will to turn this game around for us. It’s a sore one but it happens.

“The fourth official had told me as soon as the long throw was cleared that was the game over, which didn’t happen. But we’ve still got to defend the corner.”