Andre Ayew’s last-gasp penalty saw Swansea City come from behind to beat Stoke City and secure a first victory at the bet365 Stadium since 2001.
The Swans had trailed early on to a Nick Powell strike, but responded well and levelled when Connor Roberts met Ryan Manning’s cross to score his fourth goal of the season.
And Ayew sealed all three points in the dying seconds of stoppage time, converting nervelessly from the spot after Jack Clarke had brought down Kyle Naughton.
The result leaves the Swans fourth in the table, one point behind the automatic promotion places having played two games fewer than the sides above them.
Cooper had made four changes for the trip to the Potteries as Naughton, Manning, Korey Smith and Jay Fulton came in for Joel Latibeaudiere, Jake Bidwell, Conor Hourihane and Yan Dhanda respectively.
Swansea would have wanted to get off to a bright start, but they fell behind in just the sixth minute.
Marc Guehi’s cross-field pass was cut out by Steven Fletcher and the loose ball fell to Powell, who calmly guided the ball beyond Freddie Woodman.
The Swans took a while to find their feet again after the early setback, but started to gain control with a couple of extended periods of possession in the Stoke half.
And they levelled in the 19th minute with a superb goal.
Manning produced a superb cross with plenty of pace on it, and Roberts arrived on the blindside of his marker to steer the ball low into the net.
Nine minutes later and Stoke nearly restored their lead through a thunderous drive from Tommy Smith, which had Woodman beaten but struck the post to Swansea’s relief.
Manning then produced an excellent strike of his own, hammering a volley goalward that Angus Gunn could only push away, with no Swansea shirt quite able to get onto the loose ball.
Roberts worked the keeper soon after from Fulton’s deft flick as the visitors built up a head of steam with half-time approaching.
Manning nearly snuck another long-range effort past Gunn, with the keeper just getting fingertips to it as it threatened to find the bottom corner.
But the Swans needed an excellent stop from Woodman to keep the scores level at the break, as Harry Souttar’s half-volley headed for the top corner until the keeper leapt to his right to parry.
Stoke started on the front foot in the second half with Fletcher cannoning a shot against the post from close range, before James Chester blazed the follow-up well over the bar.
Fulton produced two outstanding passes to get Swansea back on the attack, and the second of those led to Roberts just failing to connect with another excellent Manning delivery.
The game remained every bit as open as it had proved in the opening half, and Cooper shuffled his pack as Hourihane replaced Jamal Lowe with 20 minutes to play.
Fulton was proving the most influential midfielder on the pitch, and another excellent piece of skill saw him tee up Hourihane, who saw his driven show blocked away for a corner.
Swansea were firmly on top and thought they were about to get a winner when Roberts arrived onto a Matt Grimes cross at full stretch, but Gunn made a save he knew little about to keep the scores level.
However, he could not stop Ayew scoring his 11th goal of the season after Clarke had tripped Naughton as he advanced into the box.
Stoke City: Angus Gunn, Harry Souttar, Danny Batth (Jack Clarke 46), James Chester; Tommy Smith, Joe Allen, John Obi Mikel (captain), Rhys Norrington-Davies; Jacob Brown, Steven Fletcher, Nick Powell (Jordan Thompson 86).
Unused Substitutes: Adam Davies, Sam Vokes, Tashan Oakley-Boothe, Jordan Cousins, Josh Tymon, Will Forrester, Christian Norton.
Swansea City: Freddie Woodman; Kyle Naughton, Ben Cabango, Marc Guehi; Connor Roberts, Korey Smith, Jay Fulton, Matt Grimes (captain), Ryan Manning; Andre Ayew, Jamal Lowe (Conor Hourihane 70).
Unused Substitutes: Ben Hamer, Morgan Whittaker, Paul Arriola, Yan Dhanda, Joel Latibeaudiere, Jake Bidwell, Ollie Cooper, Kieron Freeman.
Referee: David Webb