Ghanaian forward Andre Ayew scored for Swansea City in their 3-1 home loss to Bristol City in their Championship game on Saturday.

The Swans were left to rue their missed opportunities as their 13-game unbeaten league run at the Liberty Stadium was ended by Bristol City.

Steve Coopers side dominated the opening half but were left frustrated after seeing Yan Dhanda, Conor Hourihane, Ben Cabango, Jamal Lowe and Jake Bidwell all fail to bulge the net.

They had to wait until the 55th minute to go ahead as Andre Ayew beat Dan Bentley from the penalty spot after a handball from ex-Swansea man Kasey Palmer.

But after being outplayed, the Robins improved and levelled through Nakhi Wells midway through the second half.

Palmer then put his side ahead directly from a corner before substitute Antoine Semenyo netted in injury time as Swansea lost ground in the race for a spot in the Championship's top two.

But they fell behind 10 minutes after the restart as referee Keith Stroud pointed to the penalty spot after former Swan Palmer handled the ball in his own box as Bidwell lurked.

And Ayew coolly slotted beyond Bentley to give his side a deserved lead.

Having been second best, the visitors finally responded and showed some attacking intent, although they failed to test Freddie Woodman.

But the home side were left stunned just 11 minutes after going in front as Zak Vyner evaded the challenge of Marc Guehi before squaring to Wells who slotted into the bottom corner to make it 1-1.

It was only the seventh Championship goal Swansea had conceded on home soil this season, and Bristol City coincidentally were the only side to take points off the Swans this season in league games where Cooper's side have scored the first goal after the 1-1 draw between the sides at Ashton Gate.

After a nervy spell, Swansea improved again and saw Ayew head wide before Guehi went close with a header of his own.

Jay Fulton replaced Dhanda with 12 minutes left on the clock.

But after conceding a penalty at the other end, Palmer atoned for his earlier error by putting his side ahead in spectacular fashion with a goal directly from a corner.

The Swans looked shellshocked, and Cooper sent on Paul Arriola and Morgan Whittaker, with Hourihane and Latibeaudiere making way.

Arriola was presented with a glorious opportunity to make an instant impact as Bidwell headed into the path of the American, although he was unable to keep his volley on target from around 10 yards out.

Tyreeq Bakinson was well off target with an effort at the other end as time ticked away for the Swans.

Ayew then drilled wide from the edge of the box in injury time before Wells also missed the target.

But Semenyo tapped home after charging down Woodman at the death to seal victory for the Robins as Swansea lost for only the second time in the Championship at home this season ahead of Wednesday's trip to Stoke City.