Newport County progressed to the third round of the FA Cup after an extra-time winner sealed their 3-2 victory against Rochdale.
County were first on the scoresheet as Matt Dibley-Dias fired the ball in from long range.
However, Rochdale would score two goals from Luke Hannant and Dajaune Brown as they thought they were through.
But a late equaliser through Yahya Bamba sent the game to extra time, with Matty Jacob sealing the win in the 109th minute.
Newport made two changes to the side that drew against Walsall on Tuesday night as Jordan Wright and Harrison Biggins made way for Jake Turner and Kion Etete.
Michael Adu-Poku showed promise within the first five minutes as he beat his man on the wing and drove towards goal, though he was unable to find an amber shirt in the box.
Adu-Poku continued to produce magic as he gave the full back trouble and put another cross into the box, but Kaiden Wilson cleared the ball away.
After continuously knocking on the door, County took the lead in the 19th minute as Dibley-Dias fired a shot from outside the box and found the bottom right corner.
Bamba tried finding a second not long after as he dribbled through Rochdale's midfield and found his way to the box; however, his effort went wide.
Moments later, Hannant grabbed the equaliser as the ball was played into the box and the striker was able to convert from inside the six-yard box.
Jamie Allan almost put the home side in front minutes later as he tried his luck outside the box, with his effort thumping the crossbar.
James Crole answered straight away with an effort of his own as he broke through the backline and tried to put the ball by the near post but also hit the woodwork.
Brown had the first chance of the second half as he found himself with space outside the box, with his effort ultimately winning a corner.
However, Newport came straight back at them with corners flying into the box, although County could not make the most of those chances.
A monstrous tackle by Matt Smith in the 65th minute set the tempo for the rest of the game as County pushed for a second.
Bamba almost found the second as his header looped over Sam Waller, but the effort was too high as the ball narrowly missed the goal.
Crole almost had the ball in the net as he brought the ball down in the box and tried to get past the Rochdale defence but wasn't able to do so.
But it was Rochdale who got the second of the match as the ball was crossed in from the left-hand side and Brown was able to head the ball into the side netting.
However, Bamba scored an equaliser moments later as a cleared-away ball fell to his feet, and he was able to put the ball in the left-hand side of the goal.
Shaquille Gwengwe almost scored the winner late on as he had space in the box, but Waller parried the ball away as the game went to extra time.
Lee Jenkins had the first shot on target in extra time as a corner ball found him in the centre of the box, but his header went straight to the keeper.
And finally, with ten minutes to go, Newport took the lead as Bamba played the ball through to Jacob, who rifled the ball into the roof of the net.
Christian Doidge almost added a fourth with five minutes to go as he volleyed the ball towards goal inside the box, but his effort went over the bar.
Newport County will be ball number 55 in the draw on Monday, with the third-round games commencing on the weekend of Saturday 9 January.
Newport County: Turner, Norman, Jenkins, Cameron, Jacob, Smith (Brennan 71'), Dibley-Dias, Adu-Poku (Gwengwe 88'), Bamba (K. Evans 109'), Etete (Garner 90'), Crole (Doidge 88').
Unused Substitutes: Wright, C. Evans, Sassi, Davies.
Rochdale: Waller, Flint (Ebanks-Landell 80'), Bilongo (Maguire 98'), Wilson, Francis (East 68'), Gilmour, Allen, Adebayo-Rowling (Middleton 46'), Silcott-Duberry (Paterson 68'), Brown (Henderson 87'), Hannant.
Unused Substitutes: Spaven, Adeeko, Smith.
Match Officials: Scott Jackson (Referee), Matt Sowerby (Assistant Referee), William Murray (Assistant Referee), Greg Rollason (Fourth Official).
Attendance: 2620.