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, 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.