Arsenal 3 Sunderland 2: Theo Walcott came off the bench to help Arsenal grab the 10th straight win which sent them back to the top of the Premier League after throwing away a two-goal lead at home to Sunderland.
The England under-21 forward had missed a great chance himself moments before a superb piece of skill on the edge of the box set up Robin van Persie to drill in the winner with 10 minutes left.
While the final result continued the Gunners' fine start to the new season, manager Arsene Wenger will be all too aware it could have proved a costly lapse in concentration which allowed the visitors back from the dead.
The hosts had raced ahead inside the opening quarter of an hour through a brilliant free-kick from Van Persie and Philippe Senderos' close-range effort.
But Sunderland pulled a goal back through Ross Wallace, and were then level after the break when Kenwyne Jones headed in.
Van Persie - with his third goal of the week - may have won it late on, but Wenger will know there will be more similar tests to pass if they are to indeed become genuine title challengers again this season.
Van Persie hailed his side's battling performance. "It was a difficult day today - Sunderland played very well," he said.
"We scored two goals and after we became a bit sloppy. It was our own fault but Sunderland were unlucky to lose today.
"At half-time we told each other, we had to get in there and fight for three points. It wasn't a pretty game."
Sunderland manager Roy Keane was pleased with the resolve shown by his team even though they lost.
He said: "We showed good character and good quality and nearly hung in there for a point."
The former Manchester United midfielder declined to criticise the 90th-minute dismissal of Paul McShane, who was shown a straight red for a foul on Alexander Hleb but added: "I think the referee was very quick to get his red card out."
Arsenal boss Arsene Wenger said: "At 2-0, the game looked easy - in our minds, it was too easy. But they came back to 2-1 and 2-2. Then it was a test of mental strength and resilience.
"Robin van Persie got a third goal - which I think was deserved - but they could have got a third goal too."