Sergio Aguero struck twice on his return from suspension as Premier League leaders Manchester City made it a perfect six wins from six under manager Pep Guardiola.
Aguero, back in the City side following a three-match ban, scored in each half – including a contentious 65th-minute penalty after Michael van der Hoorn brought down Kevin de Bruyne – but Guardiola’s team were made to work hard for their 3-1 victory and could not relax until Raheem Sterling wrapped it up 13 minutes from time.
Fernando Llorente cancelled out Aguero’s ninth-minute opener, and although Swansea have now gone four games without a league win, under-pressure boss Francesco Guidolin could take some satisfaction from seeing his side produce their best performance of a testing campaign.
City, though, march on, with Guardiola equalling Carlo Ancelotti’s Chelsea record for six successive victories at the start of a Premier League campaign.
They did not fire on all cylinders in west Wales, but there was enough star quality at key moments to make a telling difference.
Aguero and David Silva returned for City among 10 changes from the side that claimed a 2-1 EFL Cup win against Swansea on Wednesday, with only defender John Stones remaining in the starting line-up from that game.
Swansea, meanwhile, showed four changes, including starts for Llorente and Gylfi Sigurdsson. But Neil Taylor and Ki Sung-yeung, who both displayed public disapproval of Guidolin’s decisions to substitute them against Chelsea and Southampton respectively, were on bench duty.
With speculation intensifying daily about Guidolin’s future, Swansea needed a bright start, and they had the ball in the net via Sigurdsson after just five minutes, but referee Neil Swarbrick had already whistled for a foul by Jack Cork.
But Swansea’s promise sparked a decisive response as Aguero left Jordi Amat floundering inside the penalty area with a brilliant first touch from Bacary Sagna’s pass, and then finished majestically for his 10th goal of the season.
Swansea, though, responded magnificently as they equalised just four minutes later when Sigurdsson found Llorente, and the Spanish striker left Claudio Bravo clutching fresh air as his rasping half-volley flew high into City’s net.
And it took the visitors a while to regain their rhythm, with Swansea refusing to take a backward step, and Sagna was booked for a foul before De Bruyne rifled a shot just wide following a flick by Sterling.
City regained territorial control as half-time approached, but Swansea goalkeeper Lukasz Fabianski was not unduly troubled as an entertaining opening 45 minutes ended 1-1.
Swansea began the second period in continued impressive form, and they went close to a second goal when the hard-working Wayne Routledge found Sigurdsson, who volleyed over the bar with Bravo rooted to the spot.
But City struck in controversial fashion midway through the half when Van der Hoorn was adjudged by referee Swarbrick to have challenged De Bruyne unfairly, and Aguero made no mistake from the spot.
Then with Swansea attacking, Leon Britton lost possession and Sterling stormed up the field before applying an effortless finish, and City were home and dry.