Fernando Llorente struck twice in stoppage time at the Liberty Stadium as Swansea City fought back to hand Crystal Palace a sixth defeat in a row.
Palace took the lead through Wilfried Zaha but Gylfi Sigurdsson levelled with a free-kick before half-time.
The home side took control of the second half thanks to two goals from Leroy Fer in two minutes.
But three goals in nine minutes, from James Tomkins, a Jack Cork own goal and a Christian Benteke strike put Palace in front.
However, Llorente, a substitute, scored twice in stoppage time to hand Swansea a first Premier League win under Bob Bradley and lift them off the foot of the table.