LITTLE more than two weeks ago, Gary Harkins sustained what was reported as a broken ankle.

Photographic evidence apparently exists of the player showing off the full cast on Twitter. The images are important because the manner in which he played against his former club last night was tantamount to some form of medical miracle.

The actual diagnosis was closer to ligament damage, but Harkins nonetheless hauled himself from his sick bed to have a hand in both his side's goals and his Lazarus-like recovery played no small part in breaking the hearts of his former team. It eased them through to an away tie against Hibernian in the next round and also means that Kenny Shiels goes into next week's epoch-defining all-Ayrshire Scottish Communities League semi-final against Ayr United having never lost a cup match as Kilmarnock manager.

"We didn't think he would make it," Shiels admitted. "He came through training yesterday and we waited to see if there was a response but he said he didn't have any. We are surprised that he came back so quick . . . maybe it is the Killie pies."

Harkins had been the headline name on the long list of injuries, ineligibilities and departures which Shiels had said pre-match was likely to deprive him of up to 13 players and had been posted missing when the teams had drawn 1-1 at Dens Park 10 days ago.

Dundee's Matt Lockwood had failed to score from the penalty spot in that game, and Dundee arrived in Ayrshire fancying their chances of becoming the first SFL team to take the scalp of an top-flight outfit in this year's competition.

Garry Hay hooked a right-foot shot over the bar early on, but before long Steven Milne – the only recognised striker in the Dundee side, with Gavin Rae endeavouring to give stealthy support – was testing Cammy Bell and prodding a right foot effort narrowly wide of a post.

By contrast, it was an uncertain start from the hosts. As the half drew on, however, there were signs of life, particularly from the dormant Harkins. First he strolled past a non-existent Ross Chisholm challenge to fire a low shot too close to Rab Douglas, then he arrived at the back post to head a James Fowler cross into the sidenetting.

The player's growing influence was confirmed 10 minutes before the break, when the former Dundee man got his head on a mighty Bell punt to direct the ball into the path of Paul Heffernan. The Irishman's left-foot finish was so precise and typical of the man that it was a mystery that the PA announcer could mistake the scorer for Hay.

Smith afterwards said he felt Manuel Pascali had fouled Rae in the build-up to the goal. "I'm always looking for a foul there but the referee has made the decision that it was not," Smith said. "But over the two ties the boys should be happy with their performances."

Dean Shiels, Heffernan's former Doncaster team-mate, took a wage hit last week when his father persuaded him to sign permanently and his first goal as a bona fide Kilmarnock player was spectacular. Again Harkins was the architect, and the Irishman took a touch to steady himself before firing a searing drive past Douglas.

The soft Rugby Park playing surface cut up the longer the game went on, rendering enterprising passing football difficult, but Dundee emerged after the break with a flea in their ear, and just after the hour mark, they discovered an avenue back into the match. Gary Irvine's cross picked out the industrious Rae, who got good purchase on his downward header.

Suddenly, Dundee – playing towards their own fans – were threatening to score. And Kilmarnock were threatening to shoot themselves in the foot. Milne fired too close to Bell then Rae almost grabbed a second when he so nearly profited from a sloppy back-header from Pascali.

Barry Smith threw on striker Graham Bayne for Chisholm as the Dens Park side mounted a desperate late bid to take the game into extra time, but Kilmarnock had enough nous and know how to keep them at arms length. As for Harkins, he played the full 92 minutes, before taking the applause from both sets of fans. Maybe he had just run off his injury.