Cardiff City edged a thrilling FA Cup replay against League Two Carlisle to set up a fourth-round tie at Reading.
Carlisle scored through Nathan Thomas' 20-yard shot, before Aden Flint headed in Will Vaulks' long throw to equalise.
Josh Murphy volleyed Cardiff ahead and Flint got his second from close range.
McKirdy converted Thomas' cross for Carlisle, but Danny Ward's fine turn and finish restored Cardiff's two-goal advantage and they held on, despite McKirdy scoring a spectacular second.
Carlisle had been 2-0 up in the opening match before two second-half goals from the Championship side took it to a replay and the two teams produced a fantastic match at Brunton Park.
The hosts went ahead after only seven minutes when Thomas scored after Hallam Hope had done well to keep the ball in play. However, the lead only lasted 11 minutes as Flint's header made it 1-1 and Carlisle had a chance to retake the lead but McKirdy's powerful effort hit the woodwork.
Cardiff, 12th in the Championship, went ahead for the first time through Murphy's volley in first-half injury time and the game looked finished when Flint scored his second early after the restart.
But McKirdy pulled one back from Thomas' cross, although Ward put Cardiff 4-2 ahead in the 57th minute.
However, a great strike from McKirdy in the 64th minute gave him his second goal, Carlisle their third and his team 26 minutes plus injury time to find a goal that would have taken the tie to extra-time.
Carlisle, 21st in League Two, had been the lowest-ranked team left in the tournament but they could not find a fourth goal and Cardiff will now play at Reading on Saturday, 25 January.
It means Northampton Town, who face Derby at home in the fourth round, pick up an extra £250,000 for being the last remaining League Two side left in the FA Cup.
arlisle United: Collin; G Jones, Iredale, Webster, Mellish (Olomola 81); M Jones (Charters 87), Watt, Scougall (Loft 67); McKirdy, Thomas, Hope.
Subs: Gray, Bridge, Knight-Percival, Sagaf
Cardiff City: Smithies; Coxe (Bennett 70), Bamba, Flint, Richards; Vaulks, Ralls; Whyte (Pack 83), Paterson, Murphy; Ward
Subs: Day, Nelson, Hoilett, Glatzel, Bogle
Referee: Darren Handley
Attendance: 4,381 (348)