Kilmarnock 2-1 Dundee
Kilmarnock survived a spirited second-half display by Dundee to emerge victorious in their Scottish Cup fourth-round replay at Rugby Park.
Dundee's movement in the final third and out wide caused Kenny Shiels' men initial problems.
But first-half goals by Killie's Paul Heffernan and Dean Shiels put them in command and they held on after Gavin Rae had headed home for the Dark Blues.
Kilmarnock's reward is an away tie at Hibernian in the fifth round.
Gary Harkins made a surprise return to the Killie side, given that he was reported to be out for six weeks with a broken ankle at the start of January.
He replaced Danny Racchi, who dropped to the bench, while left-back Rory McKeown came in for the ineligible Ben Gordon. The Taysiders were unchanged.
Midway through the first half Harkins burst through on the goal of his former team but hit his shot straight at Dundee keeper Rab Douglas.
Soon after that Kilmarnock made a quick break and Harkins soared to head just wide of the goal, then Harkins flicked the ball to Heffernan but the Irish striker's effort sailed wide.
Dundee's Steven Milne ought to have done better when he caught sight of goal in 33 minutes but instead his shot was poor.
And the visitors were made to pay when Killie, often praised for their attractive passing football this season, chose a more direct method of play.
Harkins got on the end of a long ball and his header found Heffernan who scored his 12th goal of the season with a left-foot half volley from 15 yards.
Immediately, Shiels floated a curling shot wide of the far post but the manager's son was soon on the score sheet.
Harkins was again the provider as he crossed for Shiels who flicked the ball up and hammered a volley past Douglas as half-time approached.
Dundee looked eager after the break and were rewarded with a goal in 63 minutes.
Jamie McCluskey and Gary Irvine worked the ball down the right wing and Irvine's cross into the box was met by the diving Rae who nipped ahead of Liam Kelly to head the ball beyond the helpless Cammy Bell.
And Dundee could have levelled with 20 minutes remaining when Rae fed Milne but his shot from 16 yards was straight at Bell.
Kilmarnock: Bell, Fowler, Kroca, Sissoko, McKeown, Kelly, Pascali, Hay (Racchi 84), Shiels, Harkins, Heffernan. Subs Not Used: Letheren, Silva, Dayton, Kennedy.
Booked: Sissoko, McKeown.
Goals: Heffernan 34, Shiels 43.
Dundee: Douglas, Irvine, McKeown, McGregor, Lockwood, Chisholm (Bayne 83), Rae, O'Donnell, Conroy, Milne, McCluskey. Subs Not Used: Gibson, Hyde, Weston, Benedictis.
Goals: Rae 63.
Referee: Stevie O'Reilly