Tommy Miller scored two penalties to help Sheffield Wednesday reach the third round of the FA Cup with a 3-2 win over Northampton.
Mark Beevers opened the scoring for the home side while Billy McKay and Kevin Thornton found the net for Northampton.
Beevers gave Wednesday a sixth-minute lead with a close-range header after meeting Tommy Spurr's corner.
Wednesday's Clinton Morrison looked certain to score when he was put through by Chris Sedgwick but the striker's shot came back off a post.
The visitors threatened to equalise when McKay's shot from inside the area was turned wide by Nicky Weaver and Nathaniel Wedderburn's long-range drive flashed narrowly wide.
Miller increased Wednesday's lead eight minutes before the break from the penalty spot after Neil Mellor was tripped in the area by Liam Davis.
McKay then scored in the 56th minute after being left unmarked to give Northampton hope.
It looked to be all over when Miller converted a stoppage time penalty conceded by Paul Rodgers but Thornton scored with a quickly-taken free-kick to give Northamton a glimmer of hope at the death.