Gylfi Sigurdsson (obscured) equalises with a brilliant free-kick nine minutes before half-time.
Substitute Fernando Llorente scored twice in stoppage time as Swansea recorded their first win since the opening day of the season in a remarkable encounter with Crystal Palace.
The Liberty Stadium witnessed an astonishing seven goals scored after the break and four in 11 second-half minutes.
Swansea were 3-1 ahead before Palace produced an extraordinary fightback to take a 4-3 lead.
It seemed as if the visitors would end their five-match losing run in the league, but then up popped substitute Llorente with two late goals as the ground erupted on the full-time whistle.