Theo Walcott came off the bench to net a late winner and fire Arsenal into the fifth round of the FA Cup with a thrilling victory at Brighton.
Manager Arsene Wenger had made several changes from the side which thumped West Ham 5-1 in the Premier League on Wednesday night, but eventually the Gunners had enough to see off the npower Championship side, who had twice levelled.
In-form Olivier Giroud fired the visitors ahead on 16 minutes before Ashley Barnes equalised with a powerful header.
Giroud netted again on 56 minutes with another well-taken strike, but the Seagulls were level again through a diving header from Argentinian forward Leonardo Ulloa on his debut after joining from Almeria.
Arsenal finally made sure of a place in the last 16, though, when Walcott's shot was deflected in following a corner with five minutes left.
Brighton, hoping to add to their third-round scalp of Newcastle here, started brightly with Will Buckley making some headway down the right channel.
On 15 minutes a floated a ball in from the left over a static Arsenal defence saw Barnes clear on goal with no offside flag.
However, Wojciech Szczesny was quickly off his line to narrow the angle and made a superb reaction save to push the ball past the post.
It proved decisive as Arsenal went up the other end and opened the scoring.
As he had been against West Ham, Lukas Podolski was again the provider, creating space on the edge of the penalty area before feeding Giroud, who curled the ball into the bottom left corner for a third goal of the week.
The early goal settled any nerves as Arsenal now allowed themselves more time on the ball.
Brighton, though, refused to lie down and again created problems through the right channel, with a close-range flick from Ulloa booted away in a crowded six-yard box.
The Seagulls thought they had levelled when Inigo Calderon robbed Andre Santos 20 yards out and surged to the goalline before cutting a pass back through the penalty area.
Szczesny palmed the ball away, which was slotted in by Ulloa, but the offside flag was up straight away.
Brighton, though, were level on 33 minutes. A short corner was whipped in from the right, and Barnes charged through a sea of red shirts to get to the ball before Szczesny and power a header into the back of the net.
The home side were forced into a change when captain Gordon Greer hobbled off with what looked like a thigh injury to be replaced by Gary Dicker.
At the start of the second half, Arsenal full-back Carl Jenkinson got in on the overlap down the right after a surging run by Rosicky, but his snapshot was beaten away by Brighton goalkeeper Casper Ankergren.
On 52 minutes, Oxlade-Chamberlain was fouled 20 yards out by Adam El-Abd.
Podolski lined up the free-kick, which he looped over the wall and crashed against the crossbar.
Arsenal were back in front on 56 minutes with another brilliant finish from Giroud.
Diaby floated an angled pass into the left side of the penalty area, where Frenchman Giroud held off El-Abd, took the sting out of the ball with a lovely first touch and then lashed it into the net from six yards.
Giroud came close to chalking up a hat-trick soon after as Rosicky's pass split the Brighton defence, but this time the keeper made a good save to beat away his angled drive from the edge of the penalty area.
Brighton, though, refused to lie down and were back on level terms after 62 minutes.
Arsenal again failed to deal with a cross from the right as Barnes' ball in was dispatched past Szczesny with a diving header by Ulloa.
With 20 minutes left, Wenger sent on Walcott and Jack Wilshere, replacing Rosicky and Oxlade-Chamberlain.
Podolski got away down the left and cut the ball back for Giroud, but this time the France striker could only hack a half-volley wide.
An acrobatic effort from the Arsenal number 12 was then put behind, and from the resulting corner Walcott won it when his shot was deflected off El-Abd and into the net to send the Gunners through to Sunday's fifth-round draw.
• Be part of the Budweiser 2012-13 FA Cup fan film. Share your photos on Twitter: #tothedream