Teenage striker Ansu Fati got a late winner as Barcelona survived a scare to beat Dwight Yorke's A-League All Stars in a 3-2 thriller in front of 70,000 fans in Sydney on Wednesday.
The Catalan giants only arrived in Australia on Tuesday morning on a whistlestop 48-hour visit, barely a day after completing their league season with a 2-0 loss to Villarreal, which saw them finish 13 points adrift of champions Real Madrid.
They showed few effects from the long trip to turn on the style for a noisy pro-Barca crowd, dominating the first half and going into the break 1-0 ahead after French striker Ousmane Dembele clinically finished in the 34th minute.
But the All Stars stunned them with two goals in eight second-half minutes, before Xavi Hernandez's side rallied to retake control with strikes from Adama Traore and Fati.
After a rare trophy-less season, Xavi brought a strong squad with him and a host of top names started including captain Sergio Busquets, veteran Dani Alves, and the unsettled Dembele, who may have played his last game for the club.
It was always going to be a tough task for Yorke's hastily convened team, and with the former Manchester United striker on the sidelines for his first major coaching job.
Both sides had early chances with Barca teenager Alejandro Balde testing goalkeeper Filip Kurto at the near post in the sixth minute as the visitors quickly settled into a free-flowing rhythm.
Dembele went close and Gavi should have done better when Alves found him with a cross as the chances began piling up.
The breakthrough finally came with Gavi feeding Dembele after intercepting a pass and the Frenchman drilling the ball into the right-hand corner.
But the All Stars came out firing in the second half.
Reno Piscopo bundled the ball into the net two minutes after the restart, and they caught Barcelona napping again six minutes later with a counter-attack that Adama Traore -- who shares the same name as the Barca winger -- finished with a simple tap-in.
Rattled, the Spaniards reset and Barcelona's Traore made it 2-2 in the 72nd minute with a vicious shot that was saved but trickled over the line.
Fati got the winner five minutes later, curling the ball into the net after good work from Antonio Aranda. The All Stars nearly ruined the party, Garang Kuol rattling the post with three minutes left.