Huddersfield overcame a 2-0 first-half deficit to stun Swansea, whose goal hero Lee Trundle was then sent off.
Trundle had an eventful game
Trundle converted an early penalty after Matthew Glennon brought down Ian Craney, then blasted a second after good work from Rory Fallon.
Pawel Abbott's cross was put in by Jon Worthington, Abbott scored off Chris Brandon's cross, then he won an injury time penalty off Marcos Painter.
Abbott converted, before Trundle was red-carded for raising his elbow.
The defeat - the Swans' first in nine games - saw them drop out of the play-off places.
The result provides a significant boost to the Terriers, giving them their first victory in 10 matches.
But Huddersfield manager Peter Jackson was sent to the stands at the start of the second half for disputing an official's decision.
Huddersfield: Glennon, Mirfin, Holdsworth (Abbott 36), McIntosh, Adams, Brandon, Worthington, Young, Collins, Taylor-Fletcher, Booth.
Subs Not Used: Eastwood, McCombe, Beckett, Ahmed.
Booked: Collins, McIntosh, Abbott.
Goals: Worthington 67, Abbott 75, 90 pen.
Swansea: Gueret, Amankwaah (O'Leary 72), Austin, Lawrence, Painter, Tate, Craney, Pratley, Butler (Robinson 72), Fallon (Akinfenwa 76), Trundle.
Subs Not Used: Oakes, Williams.
Sent Off: Trundle (90).
Booked: Tate, Austin.
Goals: Trundle 9 pen, 43.
Ref: N Swarbrick (Lancashire).