Alexandre Lacazette fired the decisive winner as Arsenal edged a five-goal thriller against Cardiff.
The Gunners were twice pulled back by Neil Warnock's side before Lacazette, who was handed a rare start, thumped home the winner.
Arsenal had gone ahead early on in south Wales when Shkodran Mustafi rose highest to head home from a corner.
But Cardiff deservedly drew level on the stroke of half-time as they capitalised on a Granit Xhaka error before Victor Camarasa found the net.
Arsenal went ahead again in the second period though after neat link-up play between Lacazette and Pierre-Emerick Aubameyang.
READ MORE
Ingo derby now a huge test for AFC Leopards' title credentials
Arteta seeks goal spree for Premier League title cushion
Man City still 'alive' but need Arsenal to slip, Guardiola says
Leopards claw gap on leaders Gor Mahia after disarming Ulinzi
The French striker teed up his strike partner with a flick before Aubameyang found the net.
Cardiff weren't done though and levelled it up again through Danny Ward's first Premier League goal but Lacazette had the last laugh.