A replay was looking likely when Andre Green entered the pitch for the final 15 minutes at Rochdale.
But with the Emirates FA Cup second round tie about to head into stoppage-time, the on-loan Aston Villa winger struck.
There was a touch of fortune about the winning goal as, after receiving a free-kick from Lee Brown, his strike took a big deflection to deceive keeper Josh Lillis.
The move had been thought through, however, and Green was pleased to make such an important impact.
He said: “It’s a great feeling and we needed that to see them off. It’s nice to go through and not have a replay added to our schedule.
“I said to Browny that there was a space there for him to roll the ball across and then gave him the eyes.
"I was told to make an impact when I came on, so I’m pleased that I was able to do that."
“Luckily he was on the same wavelength and we got a bit of luck, and I’m thankful it came my way to help them team.
“I ran off celebrating before it hit the net, so I’m glad it didn’t hit the bar! It seemed to happen in slow motion.
“Both teams struck the woodwork and had their chances, although I felt that we deserved the win and fought really hard.
“I was told to make an impact when I came on, so I’m pleased that I was able to do that, but there’s definitely more to come.”
Green has recently returned after recovering from surgery to remove a cyst in his knee and does now expect an immediate starting berth.
He said: “We’re winning games, with Ronan and Jamal on fire, so I understand that I can’t just slot straight into the team.
“I want us to be doing well and respect the manager’s decision, but it’s only good to have that competition.”