Adam Masina's last gasp free-kick propelled Watford back into the Championship automatic-promotion places after a 2-1 victory at Cardiff.
Mick McCarthy's 10-match unbeaten start to life as Bluebirds manager was brought to a dramatic end after the Hornets left-back struck the club's first free-kick goal in five years to snatch all three points.
Cardiff had resisted wave after wave of pressure in the second period and looked to have held out for a point after Francisco Sierralta's early own goal was cancelled out by a solo strike from Nathaniel Chalobah.
Watford leapfrogged Swansea into the top two on goal difference with the late strike, which sparked wild celebrations amongst the players and staff.
McCarthy had been determined to continue his unbeaten start after reigniting Cardiff's promotion bid.
The veteran manager, who celebrated taking charge of his 1000th game at Huddersfield, scooped the February manager of the month award after signing a new two-year deal to remain in South Wales until the summer of 2023.
His side's unbeaten streak had propelled them to within touching distance of the top six, but after injuries to Joel Bagan and Joe Bennett, he was forced into making a brave call at left wing-back.
Ciaron Brown came in for his full debut and there was a recall for Perry Ng on the right to face a Watford side on a mission to break into the top two.
Chalobah replaced Andre Gray in the only change to the team who were victorious at Nottingham Forest last time out.
But they were forced to come from behind after Sierralta put the ball into his own net after 14 minutes.
Brown pounced on a loose ball high up the pitch and found Josh Murphy, who had the time and space to roll a teasing ball across the face of goal towards the waiting Kieffer Moore.
Sierralta was forced to intervene, but could only prod the ball past Daniel Bachmann to gift the hosts the lead.
But Hornets captain Chalobah led from the front to orchestrate an immediate response a minute later.
Chalobah picked up possession on the edge of the box after Philip Zinckernagel was dispossessed and used his skilful footwork to fashion a yard of space and pick out the bottom corner with a low drive.
Bluebirds goalkeeper Dillon Philips was forced into a fingertip save to deny Ismaila Sarr's deflected effort and keep the score level at half-time.
Xisco Munoz's side continued to assert their dominance with the ball after the interval but were met with stubborn resistance by the defensive trio of Sean Morrison, Aden Flint and Curtis Nelson.
But the breakthrough finally came seconds before the final whistle after Ng pushed Sarr on the edge of the area.
Masina stepped up and fired a powerful free-kick towards the centre of the goal, but Phillips was deceived by the moving ball and could not prevent it from hitting the back of the net.