Jordi Gomez fired Swansea into the Carling Cup fourth round with a 1-0 home win at the expense of 10-man Cardiff in a feisty all-Welsh affair.
The Bluebirds, who had Stephen McPhail sent off for two bookable offences, were left to rue a host of wasted first-half opportunities as Roberto Martinez's men edged a frenetic derby clash.
Gomez's curled a 20-yard free-kick past Peter Enckelman after 57 minutes to give the Swansea faithful bragging rights in the first competitive encounter between the sides since April 1999.
Enckelman had earlier denied Jason Scotland with a fine save on the stroke of half-time, while Ferrie Bodde also went close for the host.
Cardiff striker Jay Bothroyd then saw an effort disallowed for offside, but Swansea hung on for victory to book their place in the fourth round.