Swansea City made history once again in the south Wales derby as Ben Cabango's 99th-minute goal secured an extraordinary 3-2 win at Cardiff City.
Joel Piroe drove Swansea ahead inside three minutes before Liam Cullen headed home their second.
Jaden Philogene pulled one back and Sory Kaba's late header looked to have sealed a draw.
But Cardiff-born Cabango swept in right at the end to leave the Bluebirds deep in relegation trouble.
Having claimed the first league double in 111 years of this fixture last season, Swansea have repeated the feat in this campaign - and in unforgettable fashion.
Cabango steered home from close range after Jay Fulton's drive had hit the post to spark wild celebrations among the away supporters, as Swansea became the first team to win four straight south Wales derbies in the league.
Swansea are sitting pretty in mid-table after Russell Martin maintained his perfect record in this fixture.
But another painful derby day leaves Cardiff hovering above the Championship's bottom three on goal difference alone with the end of the season in sight.
This is the fixture that matters most to fans of both clubs, a game which prompts a blend of anticipation and apprehension on each side of the divide.
The stakes are high whenever the two clubs meet, but Cardiff's perilous league position ensured manager Sabri Lamouchi was especially keen to make a mark in his first derby.
Lamouchi is the fourth different opposite number Russell Martin has faced in four encounters with Cardiff as Swansea's head coach.
The Frenchman said before the game the plan was to stay compact in an attempt to frustrate Swansea, yet within three minutes his team were behind.
A quick Harry Darling throw sent Piroe scampering into the box, and he was allowed time to turn away from Mark McGuinness before flashing the ball past Ryan Allsop at his near post.
Darling then shot wide as Swansea dominated the opening quarter, before Cardiff offered a first threat when Sheyi Ojo shot straight at Andy Fisher from 20 yards.
Sory Kaba then headed over from Joe Ralls' cross but, just as Cardiff began asking questions for the first time, Swansea broke clear to double their lead.
Ryan Manning picked out a pass for Piroe, who waltzed in behind the home defence and saw his shot kicked onto the post by Allsop.
The rebound fell perfectly for Cullen, who stooped to head in from close range.
Crucially, Cardiff found an immediate response, as Kaba flicked on and the outstanding Philogene drove at Swansea.
The on-loan Aston Villa winger skipped beyond Nathan Wood's challenge and then smashed the ball home despite a touch from Swansea goalkeeper Fisher, who may not have been helped by a slight deflection off Cabango.
Cardiff had their first derby goal in the last four meetings, but Swansea ought to have their third of the afternoon when Cullen broke down the left after the break and crossed for the unmarked Piroe.
The angle of Cullen's cross allowed Allsop to come off his line and, though Piroe skipped round the Cardiff keeper, he ran out of room and the ball trickled behind for a goal-kick.
A golden opportunity had been wasted but - in the end - it did not matter for Swansea.
Cardiff had created little in the second half, but found a way through when Philogene fed substitute Rubin Colwill and his floated cross was headed home by the unmarked Kaba.
There was still time for plenty more drama, as Swansea captain Matt Grimes was left with head in hands after his half-volley crashed to safety off the bar.
But in the ninth minute of added time - after five minutes had been shown on the fourth official's board - Fulton's free-kick hit the wall and he smashed a second effort onto the base of the post.
The rebound hit Joel Latibeaudiere and fell perfectly for Cabango - who had been rejected by Cardiff as a youngster - to score a famous winner.
Cardiff City: Allsop, McGuinness, Ng (Romeo 90’), Kipré, Philogene, O’Dowda (Sawyers 46’), Wintle, Ralls ©, Rinomhota (R Colwill 61’), Ojo (Wickham 61’), Kaba. Subs not used: Alnwick, Simpson, I Davies.
Swansea City: Fisher, Manning, Cabango, Darling (Paterson 77’), Grimes ©, Ntcham (Cooper 52’), Piroe, Cundle (Fulton 46’), Cullen (Latibeaudiere), Wood, Walsh (Allen 64’). Subs not used: Søndergaard, Whittaker.