Arsene Wenger admitted he was dangerously close to being knocked out of the FA Cup at the third-round stage for the first time in his career.

Arsenal required a second-half comeback to overcome Preston and, although goals from Aaron Ramsey and Olivier Giroud secured a 2-1 win, Wenger admitted he was angry with his players as they went into the interval a goal behind.

“Yes, I was angry,” the Arsenal manager remarked after a thrilling cup tie. “We are top-level Premier League and we were dominated in the first half. Preston had chances and we were just not at the pace of the game that the game demanded. We did not want to go home and be out of the cup.

“We were not at the races in the first half and we were beaten everywhere. We were not compact, we didn’t win the duels and we were outplayed. But sometimes, when you come out of Christmas and you think it is going to be a bit easier, it is difficult in the FA Cup.

“Someone reminded me that I had never been knocked out of the FA Cup at this stage in my career,” he said. “But in the first half it was close.”

As he had at Bournemouth on Tuesday night, Giroud was the central figure in an Arsenal comeback and it was his late goal that ensured there would be no replay at the Emirates Stadium.

Preston vs Arsenal player ratings Show all 22 1 /22 Preston vs Arsenal player ratings Preston vs Arsenal player ratings Chris Maxwell – 6 out of 10 Made a handful of important saves in the latter stages of the game, but did concede two. Preston vs Arsenal player ratings Marnick Vermijl – 5 out of 10 Showed his ability going forward, but tended to get caught out of position on occasions. Preston vs Arsenal player ratings Tom Clarke – 6 out of 10 Relentlessly battled throughout and would never back down from a challenge, but at times his temper was getting the better of him. Preston vs Arsenal player ratings Paul Huntington – 6 out of 10 He made a number of crucial challenges at the back to break down the Arsenal forwards, but was outclassed at the back, at times. Preston vs Arsenal player ratings Greg Cunningham – 6 out of 10 It was a mediocre display from Cunningham today, who just looked outclassed by the Arsenal players at times. Preston vs Arsenal player ratings Paul Gallagher – 6 out of 10 Was a threat in the air, both in the defensive and attacking third. Created a number of chances too. Preston vs Arsenal player ratings Ben Pearson – 7 out of 10 Particularly in the first half, he controlled the pace of the whole game, latched onto every loose ball and used possession tremendously. Preston vs Arsenal player ratings Daniel Johnson – 5 out of 10 It was an average display from Johnson, who wasted possession at times and his decision making was questionable. Preston vs Arsenal player ratings Aiden McGeady – 7 out of 10 Was Preston’s best player in my opinion today – he created the first goal with a moment of magic and continued to impress throughout. Preston vs Arsenal player ratings Jordan Hugill – 7 out of 10 The youngster battled persistently and deserved a goal to cap off his impressive performance. Preston vs Arsenal player ratings Callum Robinson – 7 out of 10 Robinson showed his ability with an unquestionable work-rate, constant pressure to hunt possession and he got a well-deserved goal for his efforts. Preston vs Arsenal player ratings David Ospina – 5 out of 10 Made a couple of crucial saves, but aside from the goal it was a relatively quiet day at the office for Ospina. Preston vs Arsenal player ratings Ainsley Maitland-Niles – 6 out of 10 Despite being caught out of position in the early stages of the game, he found his feet and worked well defensively and going forward. Preston vs Arsenal player ratings Gabriel – 5 out of 10 His positioning was questionable and he was struggling to keep up with the Arsenal defensive line. Preston vs Arsenal player ratings Shkodran Mustafi – 6 out of 10 Made a crucial stop on the goal-line to stop Preston doubling their tally and carried a presence on the pitch today. Preston vs Arsenal player ratings Nacho Monreal – 6 out of 10 Looked sloppy at the start of the first half, but improved as the game progressed. Made a number of important interceptions. Preston vs Arsenal player ratings Aaron Ramsey – 7 out of 10 Managed to find his feet in the second half, as his goal ignited Arsenal’s comeback in the second half. Preston vs Arsenal player ratings Granit Xhaka – 5 out of 10 He failed to influence the game today to the level that he is capable of. Showed glimpses of brilliance, but it was not enough. Preston vs Arsenal player ratings Lucas Perez – 6 out of 10 Battled constantly throughout and deserves praise for his role in Giroud’s winning goal. Preston vs Arsenal player ratings Alex Iwobi – 6 out of 10 A miserably mediocre performance which witnessed him regularly being wasteful in possession. Preston vs Arsenal player ratings Alex Oxlade-Chamberlain – 5 out of 10 Made a habit of giving away possession and making the wrong decisions. Preston vs Arsenal player ratings Olivier Giroud – 7 out of 10 Was isolated in the first half, but regained a powerful presence in the latter stages and scored the winner – as per usual.

“I named him captain as I like to rotate a bit,” said Wenger. “He went through a period when he was in discomfort as he didn’t play and during this period, which was quite long, he kept his focus and worked hard. He has shown leadership qualities which is why I made him captain.”

Wenger went out of his way to congratulate a Preston side whose form at Deepdale may have been indifferent – they have won once at home since mid-October – but who took the game to Arsenal superbly.

“I would like to congratulate Preston on the quality of their play, especially in the first half,” he said. “We were outpaced, they played with desire, enthusiasm and quality and they gave us many problems.

“There was full commitment for 90 minutes and it was a great cup tie. We needed to dig deep to win. In the second half it was all us but Preston defended well and we needed to do something special to win. It was a great cup tie.”

Grayson found Preston's defeat particularly tough to stomach (Getty)

For the Preston manager, Simon Grayson, who had knocked out Manchester United out at the third-round stage when manager of Leeds, the defeat seemed especially harsh.

“It was hard to speak to the players after the game and it was hard to know what to say,” he said. “The way we played in the first half was as good as we have played since I have been here. We just didn’t score that second goal.