For a long time it seemed Thursday nights, which have become Arsenal’s haven from the tide of neurosis that engulfs their domestic affairs, would be struck off the list of safe spaces. This was a confused, deeply uninspired performance that will largely be forgotten because Nicolas Pépé, the club’s £72m record signing who had been under mounting pressure to deliver, came off the bench to score two marvellous free-kicks in the last 10 minutes and create a silver lining where the clouds had been jet black.

Pépé had been criticised for missing a clear chance in Monday’s defeat at Sheffield United and Unai Emery had made little secret of the fact his adaptation since arriving from Lille has been faltering. But his reputation for set-piece prowess precedes him and when he lined up his first, 25 yards out and at an angle to the right, there was cause to think he was Arsenal’s best bet of a bailout.

Anthony Martial on the spot to give Manchester United win in Belgrade Read more

It was duly curled past a questionably positioned Miguel Silva, the Vitória Guimarães goalkeeper, and into the far corner. His second, whipped venomously from a more central position in the game’s last action, was unstoppable and put Arsenal a win away from qualifying for the knockout stage. The turnaround was unexpected for the sloppy fare that had gone before but predictable for Arsenal’s proven expertise in papering over the most alarming of cracks.

“The two goals from Pépé were perfect and I think we deserved to win,” Emery said. He was half-right. What most people saw was a match in which a modest Vitória, expected to offer the standard level of supine opposition for a spot of escapism from Arsenal’s considerable league concerns, played smartly and were the better side for long periods. They led twice, through Marcus Edwards and Bruno Duarte, and it was never out of the question that extra ignominy might be inflicted.

Facebook Twitter Pinterest Gabriel Martinelli heads home for Arsenal. Photograph: Andrew Fosker/BPI/REX/Shutterstock

Edwards piled on a sizeable enough portion of it in the eighth minute when, after shifting Víctor García’s cutback on to his right foot, he beat Emiliano Martínez confidently. Two months ago the 20-year-old was still a Tottenham player, reconciling himself to the fact the “Mini Messi” epithet Mauricio Pochettino once fondly gave him would have to be lived up to elsewhere. This was only his third appearance since joining Vitória permanently and a knee-sliding celebration underlined the significance of his feat.

Arsenal responded when Gabriel Martinelli, meeting Kieran Tierney’s cross to take advantage of indecision from Silva and nod into a vacant goal, scored an equaliser they had hardly threatened. It should have awoken them after such a shoddy first half-hour but they are a team of recidivists and, sure enough, Ainsley Maitland-Niles promptly ceded possession to the impressive left-winger Davidson, whose daisycutter struck the post but fell perfectly for Duarte.

Celtic edge Lazio thanks to Christopher Jullien’s late header Read more

“We lost a lot of balls in midfield and gave them chances in the transition to score and start winning,” Emery said of that opening period. Matteo Guendouzi and Dani Ceballos were enlisted at the break for Maitland-Niles and the unfortunate Joe Willock, who suffered a similar fate at Bramall Lane. It says so much for Guendouzi, and perhaps for Arsenal too, that he is considered among the cavalry these days but his presence sharpened up a previously torpid midfield.

His first major contribution was to dash 40 yards and needlessly involve himself in a spat in which Alexandre Lacazette, who was eventually replaced by Pépé with 15 minutes left, tried to get García sent off; his final one was a slaloming run that won the free-kick Pépé converted in stoppage time.

Guendouzi remains a flawed performer but, as he also showed in an eerily similar league comeback against Aston Villa, has a gladiatorial appetite for salvage operations like this.

“Our attack played with more emotion and heart than organisation but I think that’s also important,” Emery said. That is especially so when hardly anything is functioning as it should be. Perhaps Mesut Özil would have made Arsenal more fluent but he was left out of the match squad for the fifth successive game and Emery would not offer any comment on his situation afterwards. Pépé may have come up with some timely answers but far bigger questions continue to linger.