Nathaniel Mendez-Laing scored his second goal of the season
Relegation-threatened Cardiff moved to within two points of Brighton - and a position of safety - with a vital Premier League win at Amex Stadium.
Neil Warnock's side, who earned their third away victory of the season, are third from bottom with four games left.
A brilliant Nathaniel Mendez-Laing goal gave Cardiff a first-half lead, which was doubled after the break by Sean Morrison's header.
Brighton have now lost and failed to score in their past four games.
Glenn Murray came closest to scoring for the Seagulls, skimming the bar with a shot in the second half and then hitting the post with a header in injury time.
The south coast side have five games remaining, one more than Cardiff.
Remaining fixturesBrightonCardiff20 April: Wolves (away) 21 April: Liverpool (home)23 April: Tottenham (away)27 April: Newcastle (home)27 April: Fulham (away)4 May: Arsenal (away)4 May: Crystal Palace (home)12 May: Man City (home)12 May: Man Utd (away)Problems piling up for toothless Brighton
Brighton had imploded spectacularly just three days earlier, losing 5-0 at home to Bournemouth with a performance where weak defending allowed the visitors time and space on numerous occasions.
Anthony Knockaert's red card for a reckless foul when Brighton were already 2-0 behind had made a bad situation worse, and three more goals after the Frenchman's dismissal added to his side's misery.
Chris Hughton responded by making five changes, with Pascal Gross playing for the first time since defeat by Leicester on 26 February.
Glenn Murray and Solly March also returned, and the latter went close with a shot into the side-netting in the first minute.
But by the time Murray sent a shot just over the Cardiff bar, his side were already 2-0 behind and struggling to make an impact.
That the Cumbrian striker, without a goal at home since 4 December, only came closest to scoring when he hit the post in stoppage time at the end of the match says much about the problems mounting up for Hughton.
Brighton may have a game in hand on Cardiff, but all five of their remaining fixtures will be difficult to earn any points at all from.
Momentum shift to Cardiff?
Neil Warnock full-time celebrations on the pitch with his players and staff were as passionate and as heartfelt as might be expected from the experienced Cardiff manager.
And despite the fact that they are still in the bottom three, Cardiff's performance gives the sense of a change in direction at the foot of the Premier League.
They resisted a strong start from Brighton before striking through to a superb run and long-range shot from Mendez-Laing, who ran from deep in his own half before receiving the ball back and curling it into the far corner of the net.
Morrison rose virtually unchallenged at the far post to tighten Cardiff's grip with his first Premier League goal for the club.
Taking points off title-chasing Liverpool next Sunday will be tough, but a visit to relegated Fulham on 27 April will be crucial if the momentum that looks to have swung Cardiff's way is to be maintained.
Man of the match - Sean Morrison (Cardiff City)Cardiff captain Sean Morrison led from the front. winning 83.3% of his duels, 87.5% of his aerial duels and making 10 clearances - as well as scoring his first top-flight goal'We are far from finished' - reaction
Cardiff manager Neil Warnock: "We had a few pundits say it would be our final game in the Premier League but we are alive and kicking. We deserved tonight. In the final third, if we had been more clinical we could have created more.
"Before the game I said: 'Wow, it is great, with five games to go, we've been written off.' I asked where we were five years ago and we were at Derby trying to stay in the Championship. I can't say anything better about the players. They have been great for me.
"We came out of the traps and enjoyed it today. We are far from finished yet."
Cardiff are alive and kicking - Warnock
Brighton manager Chris Hughton: "It's a reflection of where we are. We had a lot of possession in their half but we are not scoring to get that breakthrough and we are putting ourselves under pressure.
"We are on the back of two poor home defeats. We don't have a choice and we have a fight on our hands. This is a proper fight. We have to make sure we turn it round by staying together, digging deep and making ourselves hard to beat.
"It's still in our hands, but it is a difficult feeling because of the result. My job is to lift spirits, give us a chance at the weekend. The players know if we are to stay up we have to pick up results and the only way to do that by showing resilience and quality."
We have a fight on our hands - Brighton boss Hughton'Can you do it on a cold Tuesday?'- key stats
Cardiff's Nathaniel Mendez-Laing scored just his second Premier League goal of the season with the opener, each of his goals have come away from home on a Tuesday nightThe Bluebirds have completed the league double over Brighton for the first time since the 1998-99 season - when the two clubs were in the fourth tier.Cardiff have won a top-flight away match by more than a single goal for the first time since November 1956 (2-0 at Charlton Athletic).Only relegated Fulham (six) and Huddersfield (four) have won fewer Premier League points in 2019 than Brighton (eight).Brighton have lost three consecutive home league games for the first time since January 2016 in the Championship - they failed to score a single goal in both these losing runs.Cardiff's Sean Morrison has scored his third Premier League goal, his first for the Bluebirds and his first for 2,327 days since scoring for Reading against Manchester United in December 2012.What's next?
Brighton visit Wolves on Saturday, 20 April (15:00 BST). Cardiff host Liverpool on Sunday, 21 April (16:00).