Report | Swansea City 1 Bristol City 3
Swansea City suffered their first home Championship defeat since October as Bristol City claimed the spoils at the Liberty Stadium.
The Swans were beaten in the league on home soil for the first time in 14 attempts as the Robins came from behind to claim victory in SA1.
Steve Cooper's side had dominated large periods of the first half and edged their noses in front 10 minutes after the break through Andre Ayew's penalty.
But the visitors - overseen by new boss Nigel Pearson for the first time - responded with Nakhi Wells equalising, before former Swans loanee Kasey Palmer scored straight from a corner to complete the turnaround.
And the hosts' misery was completed in stoppage time, when substitute Antoine Semenyo charged down Freddie Woodman's attempted clearance and slotted into the empty net.
The Swans, who last tasted defeat here in the Championship against Huddersfield Town on October 17, remain in fourth place in the table with 59 points from 31 games.
Cooper made just a single change to the side that overcame Coventry City in midweek, with Joel Latibeaudiere replacing Kyle Naughton in the three-man defence.
Eyeing a fourth straight league victory on home soil, the Swans began on the front foot and dominated the first half at the Liberty.
Dan Bentley came to the visitors' rescue with smart saves to deny powerful strikes from Jamal Lowe and Yan Dhanda.
Meanwhile, Connor Roberts - scorer of the winning goal when the sides met here last season - was having plenty of joy down the right flank.
His fizzed cross almost resulted in the Swans breaking the deadlock on 40 minutes, but a sliding Jake Bidwell was just unable to provide the finishing touch.
The hosts maintained their pressure with Zak Vyner clearing off the line from Ben Cabango, before Bentley produced outstanding reflexes to deny Conor Hourihane from point-blank range.
However, the breakthrough did arrive for the Swans 10 minutes into the second half.
Palmer, who made 12 appearances during his loan spell here earlier in the season, was penalised for handball in the box, allowing Ayew to sweep home his 10th goal of the season.
The Robins - unchanged following their commanding 3-1 win over Middlesbrough in midweek - looked to respond with skipper Tomas Kalas just unable to turn home Palmer's free-kick.
But they did equalise in the 66th minute when Vyner got in behind the defence before squaring for Wells, who fired past Woodman for his ninth goal of the campaign.
The Swans looked to regain their advantage. Kalas cleared in the nick of time with Marc Guehi waiting to head home, before Hourihane shot straight at Bentley.
But they were stunned with 10 minutes remaining as Palmer's inswinging delivery from the left looped over the reach of Woodman, before nestling in the far corner.
Cooper responded by introducing Paul Arriola and the American almost made an immediate impact; slicing a volley from Bidwell's cushioned header into his path.
Ayew then fired a snapshot wide as the Swans desperately pushed for a dramatic equaliser.
But they were hit with a third goal at the other end in the seventh minute of stoppage time, when Semenyo chased down Woodman to rub salt into Swansea's wounds.
Swansea City: Freddie Woodman; Joel Latibeaudiere (Morgan Whittaker, 82), Ben Cabango, Marc Guehi; Connor Roberts, Yan Dhanda (Jay Fulton, 78), Matt Grimes (captain), Conor Hourihane (Paul Arriola, 80), Jake Bidwell; Jamal Lowe, Andre Ayew.
Subs not used: Ben Hamer, Ryan Manning, Korey Smith, Kyle Naughton, Ollie Cooper, Brandon Cooper.
Bristol City: Dan Bentley; Jack Hunt, Zak Vyner, Adrian Mariappa, Tomas Kalas (captain), Ryley Towler (Steven Sessegnon, 45+1); Kasey Palmer (Antoine Semenyo, 89), Tyreeq Bakinson, Adam Nagy (Han-Noah Massengo, 90+5); Nakhi Wells, Famara Diedhiou.
Subs not used: Max O'Leary, Taylor Moore, Sam Pearson, Sam Bell, Alex Scott.
Referee: Keith Stroud