Cesc Fabregas came off the bench to fire 10-man Arsenal into the FA Cup fifth round as the Gunners narrowly saw off League One Huddersfield.
The hosts led when Peter Clarke diverted Nicklas Bendtner's strike into his own net, before Sebastien Squillaci was sent off for a block on Jack Hunt.
The red card changed the game and Alan Lee headed the Terriers level.
But Fabregas slotted home a late winner from the penalty spot after Bendtner had been fouled by Jamie McCombe.
There was a tangible sense of relief at full-time at the Emirates after Fabregas, not for the first time, provided the spark that rescued the north Londoners from a tight spot.
After dominating the first 40 minutes of the match, Arsenal found themselves on the back foot following Squillaci's deserved dismissal and an equaliser from Lee - the 32-year-old striker's first goal for Huddersfield on his 26th appearance for the club.
606: DEBATE
It was such a nervy end to the match - it felt like watching the Arsenal of the first half of the season
ITISAP
Fabregas' decisive spot-kick, four minutes from time, was a cruel end for the Terriers, who rattled the Gunners with an outstanding second-half display.
The game's riveting culmination looked unlikely at the start, as the seemingly overawed visitors defended deep and allowed the home side to come forward, with Andrey Arshavin blazing over a good chance after only two minutes.
The Russian, sometimes out of sorts in recent weeks, was seeing plenty of the ball on the left-hand side up against Hunt, a 20-year-old right-back making his first Huddersfield start.
Arshavin skinned the youngster at the first opportunity and crossed for Bendtner, who could not direct his close-range effort on target.
Arshavin then fired weakly at Huddersfield goalkeeper Ian Bennett from a good position, before cutting inside Hunt and shooting against the outside of the post.
A comical Bendtner air-shot then brought ironic cheers from the 5,000 Huddersfield fans massed behind the Clock End goal, before the Dane was involved in a fortuitous Gunners' opening goal.
Latching on to a pass from Marouane Chamakh, who appeared to control the ball with his arm in the build-up, Bendtner raced clear and fired off target, only for his shot to get a helpful diversion off the sliding Clarke and into the far corner.
Arsene Wenger's men continued to look largely untroubled, with the visitors' best chance falling to the dangerous Anthony Pilkington, who miscued a header from Joey Gudjonnson's cross.
The first glitch in Arsenal's relaxed afternoon occurred when key midfielder Samir Nasri pulled up with a hamstring injury and was replaced.
The Terriers then found a way back into the game from the unlikely source of right-back Hunt.
The young defender dispossessed Arshavin for the first time in the game and set on a rampaging run through the Gunners' midfield, which ended when he was blatantly body-checked by last man Squillaci, who was duly sent off.
The red card gave the second half a totally different complexion, with Huddersfield coming out of their shell and pressing for an equaliser.
Gudjonsson was at the heart of the visitors' best moves and his dangerous cross was headed inches wide by McCombe.
The Terriers went even closer to a leveller when Gunners keeper Manuel Almunia, previously a virtual spectator on his return to the Arsenal side after four months out injured, dived down low to turn Lee's header around the post.
But the veteran Huddersfield striker was not to be denied moments later when he crashed a powerful header past Almunia from Pilkington's corner.
Wenger, keen to avoid a replay in an already congested season, sent on captain Fabregas as the north Londoners pushed forward, only to be repeatedly thwarted by Clarke.
The Terriers defender looked to make amends for his earlier lapse, first with a brave block to deny a dithering Bendtner and then with a superb saving tackle on the Dane, before Fabregas broke the League One side's resistance.
The Spain midfielder sent in a pass for Bendtner, who went down under McCombe's challenge, allowing Fabregas to calmly slot past Bennett from the resultant penalty.
There was still time for Gary Roberts to send a free-kick just over the bar, while Lee spooned Huddersfield's last chance high into the away fans, whose dreams of beating Arsenal for the first time in 40 years were extinguished.
The hosts led when Peter Clarke diverted Nicklas Bendtner's strike into his own net, before Sebastien Squillaci was sent off for a block on Jack Hunt.
The red card changed the game and Alan Lee headed the Terriers level.
But Fabregas slotted home a late winner from the penalty spot after Bendtner had been fouled by Jamie McCombe.
There was a tangible sense of relief at full-time at the Emirates after Fabregas, not for the first time, provided the spark that rescued the north Londoners from a tight spot.
After dominating the first 40 minutes of the match, Arsenal found themselves on the back foot following Squillaci's deserved dismissal and an equaliser from Lee - the 32-year-old striker's first goal for Huddersfield on his 26th appearance for the club.
606: DEBATE
It was such a nervy end to the match - it felt like watching the Arsenal of the first half of the season
ITISAP
Fabregas' decisive spot-kick, four minutes from time, was a cruel end for the Terriers, who rattled the Gunners with an outstanding second-half display.
The game's riveting culmination looked unlikely at the start, as the seemingly overawed visitors defended deep and allowed the home side to come forward, with Andrey Arshavin blazing over a good chance after only two minutes.
The Russian, sometimes out of sorts in recent weeks, was seeing plenty of the ball on the left-hand side up against Hunt, a 20-year-old right-back making his first Huddersfield start.
Arshavin skinned the youngster at the first opportunity and crossed for Bendtner, who could not direct his close-range effort on target.
Arshavin then fired weakly at Huddersfield goalkeeper Ian Bennett from a good position, before cutting inside Hunt and shooting against the outside of the post.
A comical Bendtner air-shot then brought ironic cheers from the 5,000 Huddersfield fans massed behind the Clock End goal, before the Dane was involved in a fortuitous Gunners' opening goal.
Latching on to a pass from Marouane Chamakh, who appeared to control the ball with his arm in the build-up, Bendtner raced clear and fired off target, only for his shot to get a helpful diversion off the sliding Clarke and into the far corner.
Arsene Wenger's men continued to look largely untroubled, with the visitors' best chance falling to the dangerous Anthony Pilkington, who miscued a header from Joey Gudjonnson's cross.
The first glitch in Arsenal's relaxed afternoon occurred when key midfielder Samir Nasri pulled up with a hamstring injury and was replaced.
The Terriers then found a way back into the game from the unlikely source of right-back Hunt.
The young defender dispossessed Arshavin for the first time in the game and set on a rampaging run through the Gunners' midfield, which ended when he was blatantly body-checked by last man Squillaci, who was duly sent off.
The red card gave the second half a totally different complexion, with Huddersfield coming out of their shell and pressing for an equaliser.
Gudjonsson was at the heart of the visitors' best moves and his dangerous cross was headed inches wide by McCombe.
The Terriers went even closer to a leveller when Gunners keeper Manuel Almunia, previously a virtual spectator on his return to the Arsenal side after four months out injured, dived down low to turn Lee's header around the post.
But the veteran Huddersfield striker was not to be denied moments later when he crashed a powerful header past Almunia from Pilkington's corner.
Wenger, keen to avoid a replay in an already congested season, sent on captain Fabregas as the north Londoners pushed forward, only to be repeatedly thwarted by Clarke.
The Terriers defender looked to make amends for his earlier lapse, first with a brave block to deny a dithering Bendtner and then with a superb saving tackle on the Dane, before Fabregas broke the League One side's resistance.
The Spain midfielder sent in a pass for Bendtner, who went down under McCombe's challenge, allowing Fabregas to calmly slot past Bennett from the resultant penalty.
There was still time for Gary Roberts to send a free-kick just over the bar, while Lee spooned Huddersfield's last chance high into the away fans, whose dreams of beating Arsenal for the first time in 40 years were extinguished.