Read Madrid were missing Cristiano Ronaldo, still on holiday, but both teams were close to full strength.
Miami: Barcelona drew first blood against Real Madrid ahead of the new season with a 3-2 victory in a pulsating Clasico friendly on Saturday in Miami.
The historic rivals will meet again twice in August in the Spanish Super Cup and this International Champions Cup match set the entertainment bar high, with Barcelona maintaining their 100 per cent record in pre-season.
"Physically we are in good shape, the team is winning, we just have to correct our errors," Barcelona midfielder Sergio Busquets told Premier Sports.
"We're happy for the win, it was a lot of fun for the fans because there were a lot of chances, although the players suffered in the heat and humidity."
While Barcelona beat Juventus and Manchester United, Madrid's defeat means they end their pre-season tour of the United States without a victory.
"I don't care much about the defeat, it always hurts but right now it's not the important thing," said Madrid coach Zinedine Zidane.
"It's pre-season. The results haven't gone as hoped for but it will not change anything. The important thing is to be ready for Aug. 8 (when Madrid face Manchester United in the European Super Cup)."
Madrid were missing Cristiano Ronaldo, still on holiday, but both teams were close to full strength.
Ernesto Valverde, getting a taste of Clasico drama early in his career as Barcelona manager, selected Neymar despite speculation swirling over the Brazilian's future at the club.
However, it was stalwart Lionel Messi who opened the scoring after just three minutes, firing home with the help of a deflection, before Ivan Rakitic doubled the lead with a powerful drive from Neymar's low pass.
The sell-out crowd at the Hard Rock Stadium were in for a thrilling night and Madrid fought their way back into the game with Mateo Kovacic drilling home expertly, before Marco Asensio equalised in the 36th minute after a lightning break.
After a prolonged halftime break with music, lights and fireworks shows more akin to the Super Bowl, the game restarted at the same hectic pace.
Gerard Pique sent Barcelona ahead again in the 50th minute by flicking home Neymar's curling free-kick, and it proved to be the match-winning goal.
It was the first time the teams met in a friendly since 1991 and only the second time outside of Spain. Given its success, the spectacle is likely to be repeated.
Barcelona lifted a trophy after the game but Valverde will be focused on ensuring they can impose themselves in the same way when these teams meet in two weeks at Camp Nou, this time with real silverware at stake.