Arsenal manager Arsene Wenger was a relieved figure at the final whistle after watching the Gunners get out of jail in the Emirates FA Cup against Preston at Deepdale thanks to a last-gasp strike from striker Olivier Giroud.
Wenger's team had fallen behind to the Championship side when Callum Robinson took advantage of poor defending to finish from close range after just seven minutes.
And it could have been so much worse for Arsenal as Preston spurned a number of gilt-edged chances to put the game to bed inside 45 minutes.
Welsh international Aaron Ramsey equalised early in the second half with a powerful drive, before Giroud then sealed victory with his fourth goal in as many games.
Wenger said: “We have come back many times this season in the final minute; we have to congratulate Preston because they gave us a tough game, particularly in the first half.
“The only positive from the first half was that we were only one goal down but after the break it was a totally different game.
“They defended well and they will feel unlucky tonight because they created chances and we had to give absolutely everything to win the game.
“We keep what was said at half-time quiet but in the opening exchanges we were not at the races at all. We were beaten everywhere, we were not compact, we did not win our duals and we were outplayed.
“Subconsciously you can sometimes come out of a difficult period and think it’s going to be a bit easier but I know it’s always more difficult in the FA Cup.”
Aiden McGeady was the star of the show for Preston early on and he beat Ramsey with a clever spin before his pass ricocheted off Gabriel into Robinson's path and the forward fired home.
The rest of the key chances in the first half fell Preston's way, as David Ospina saved well from Ben Pearson before Robinson had a goal disallowed.
But Arsenal improved after the break, with Ramsey powerfully firing home from the edge of the box just 30 seconds after half-time.
It looked like the tie was heading for a replay at the Emirates Stadium but Giroud left it late again for the second time inside a week.
Match winner Giroud said: “We wanted to start the game better than last time out against Bournemouth.
“They surprised us with their commitment and we were not in the game in the first half, we wanted to bounce back in the second half and show some character and fortunately we did that with an early goal.”
Dejected Preston manager Simon Grayson felt his side had done enough to at least claim a replay from the game after dominating the opening 45 minutes.
Grayson said: “There’s not many words to describe how proud I am of the players, how they followed our instructions and the effort they have made.
“Ultimately we are disappointed, we had a chance to win this game, we had so many chances in the first half to put this game to bed and we would have been worthy winners.
“But that is what Arsenal is about, they have quality players, they can hurt you but at the end of the day it is a real kick in the teeth and very disappointing.”
Preston: 22 Chris Maxwell, 2 Marnick Vermijl, 3 Greg Cunningham, 4 Ben Pearson, 5 Tom Clarke, 11 Daniel Johnson, 12 Paul Gallagher, 14 Aiden McGeady, 23 Paul Huntington, 25 Jordan Hugill, 37 Callum Robinson
Substitutes: 9 Simon Makienok for Hugill 75, 8 Alan Browne for Gallagher 60, 7 Daryl Horgan for Johnson 81
Substitutes not used: 1 Anders Lindegarrd, 9 Simon Makienok, 13 Eoin Doyle, 17 Tommy Spurr,18 Ben Pringle
Head coach: Simon Grayson
Goals: Robinson 7
Arsenal: 22 David Ospina, 5 Gabriel, 8 Aaron Ramsey, 9 Lucas Perez, 12 Olivier Giroud, 15 Alex Oxlade-Chamberlain, 17 Alex Iwobi, 18 Nacho Monreal, 20 Shkodran Mustafi, 29 Granit Xhaka, 55 Ainsley Maitland-Niles
Subsitutes: 23 Danny Welbeck for Oxlade-Chamberlain 83, 31 Jeff Reine-Adelaide for Perez 90, 16 Rob Holding for Maitland-Niles 90
Substitues not used: 26 Emiliano Martinez, 25 Carl Jenkinson, 31 Jeff Reine-Adelaide, 41 Josh Dasilva, 68 Chris Willock
Head coach: Arsene Wenger
Goals: Ramsey 46, Giroud 89
Attendance: 22.185
Referee: Robert Madley
Wenger's team had fallen behind to the Championship side when Callum Robinson took advantage of poor defending to finish from close range after just seven minutes.
And it could have been so much worse for Arsenal as Preston spurned a number of gilt-edged chances to put the game to bed inside 45 minutes.
Welsh international Aaron Ramsey equalised early in the second half with a powerful drive, before Giroud then sealed victory with his fourth goal in as many games.
Wenger said: “We have come back many times this season in the final minute; we have to congratulate Preston because they gave us a tough game, particularly in the first half.
“The only positive from the first half was that we were only one goal down but after the break it was a totally different game.
“They defended well and they will feel unlucky tonight because they created chances and we had to give absolutely everything to win the game.
“We keep what was said at half-time quiet but in the opening exchanges we were not at the races at all. We were beaten everywhere, we were not compact, we did not win our duals and we were outplayed.
“Subconsciously you can sometimes come out of a difficult period and think it’s going to be a bit easier but I know it’s always more difficult in the FA Cup.”
Aiden McGeady was the star of the show for Preston early on and he beat Ramsey with a clever spin before his pass ricocheted off Gabriel into Robinson's path and the forward fired home.
The rest of the key chances in the first half fell Preston's way, as David Ospina saved well from Ben Pearson before Robinson had a goal disallowed.
But Arsenal improved after the break, with Ramsey powerfully firing home from the edge of the box just 30 seconds after half-time.
It looked like the tie was heading for a replay at the Emirates Stadium but Giroud left it late again for the second time inside a week.
Match winner Giroud said: “We wanted to start the game better than last time out against Bournemouth.
“They surprised us with their commitment and we were not in the game in the first half, we wanted to bounce back in the second half and show some character and fortunately we did that with an early goal.”
Dejected Preston manager Simon Grayson felt his side had done enough to at least claim a replay from the game after dominating the opening 45 minutes.
Grayson said: “There’s not many words to describe how proud I am of the players, how they followed our instructions and the effort they have made.
“Ultimately we are disappointed, we had a chance to win this game, we had so many chances in the first half to put this game to bed and we would have been worthy winners.
“But that is what Arsenal is about, they have quality players, they can hurt you but at the end of the day it is a real kick in the teeth and very disappointing.”
Preston: 22 Chris Maxwell, 2 Marnick Vermijl, 3 Greg Cunningham, 4 Ben Pearson, 5 Tom Clarke, 11 Daniel Johnson, 12 Paul Gallagher, 14 Aiden McGeady, 23 Paul Huntington, 25 Jordan Hugill, 37 Callum Robinson
Substitutes: 9 Simon Makienok for Hugill 75, 8 Alan Browne for Gallagher 60, 7 Daryl Horgan for Johnson 81
Substitutes not used: 1 Anders Lindegarrd, 9 Simon Makienok, 13 Eoin Doyle, 17 Tommy Spurr,18 Ben Pringle
Head coach: Simon Grayson
Goals: Robinson 7
Arsenal: 22 David Ospina, 5 Gabriel, 8 Aaron Ramsey, 9 Lucas Perez, 12 Olivier Giroud, 15 Alex Oxlade-Chamberlain, 17 Alex Iwobi, 18 Nacho Monreal, 20 Shkodran Mustafi, 29 Granit Xhaka, 55 Ainsley Maitland-Niles
Subsitutes: 23 Danny Welbeck for Oxlade-Chamberlain 83, 31 Jeff Reine-Adelaide for Perez 90, 16 Rob Holding for Maitland-Niles 90
Substitues not used: 26 Emiliano Martinez, 25 Carl Jenkinson, 31 Jeff Reine-Adelaide, 41 Josh Dasilva, 68 Chris Willock
Head coach: Arsene Wenger
Goals: Ramsey 46, Giroud 89
Attendance: 22.185
Referee: Robert Madley