Returning midfielder Mike Cooper was the unlikely hero as his dramatic double helped Kirk Deighton Rangers into the West Riding County Cup third round.
Rangers were on the brink of exiting the competition at FC Headingley as injury time began.
But Cooper pounced with a late strike to take the game into extra-time. He went one better in the extra periods, pulling his side in-front with the game set for penalties.
Rob Holiday then sealed a 3-1 win for Dan Marshall’s men on the counter-attack.
Marshall praised Cooper, who was playing his opening first team match this season after taking a break from football.
He said: “To say he has only had two games for the reserves this year, he was exceptionally sharp.
“He gave us experience and slotted into the middle of the park. He made us strong, and difficult to break down.
“But everyone put in a shift for the team.”
Rangers will play Gildersome Spurs Old Boys in round three.
Gaz Colling and Rich Jenner could return for Saturday’s league clash at basement Harrogate & District side Pateley Bridge.
Ben Lawrence will miss out with a hernia problem.
Bridge have lost their first six matches and conceded 24 goals. But Marshall warned against complacency.
He added: “We now have to go on a little run.
“We have there with the right mindset to get the job done.”