Angel Correa stunned Barcelona with a late winner as Atletico Madrid snatched an improbable 3-2 semi-final victory in the Supercopa de Espana.
Barcelona had 75 per cent of possession in the opening 45 minutes in Jeddah, Saudi Arabia, and looked set to ease to victory once they got over the shock of shipping a goal to substitute Koke after 20 seconds of the second half.
Lionel Messi equalised, Antoine Griezmann headed Barcelona ahead against his former club, and Messi and Gerard Pique both had goals disallowed by VAR for marginal offside decisions.
But against the momentum, which suggested a Barcelona landslide, Atletico equalised when Vitolo was hacked down by Neto and Alvaro Morata fired home the ensuing 81st-minute penalty.
Atletico wanted a second penalty moments later when Pique handballed, but their frustration at not getting that decision was forgotten when Morata slipped Correa through and the Argentinian forward fired home the fifth and final goal of a remarkable game.
Now Real Madrid stand between Atletico and the Supercopa trophy, with the final on Sunday at the King Abdullah Sports City stadium.
For a while it looked like being Griezmann's night, against the club he left in a €120million close-season deal last year.
Instead, along with the rest of the Barcelona team, he traipsed off wondering how the match slipped away.
The first half was largely forgettable, save for Messi forcing a fine stop from Jan Oblak after a one-two with Jordi Alba, and the goalkeeper also needed to be sharp to keep out an attempted chipped finish from Griezmann.
But Barcelona dominated, their front three of Messi, Griezmann and Luis Suarez full of ideas and sharp movement, and it seemed the floodgates would open in good time.
Yet Atletico took the lead when Koke, on for the second half in place of Hector Herrera, took a pass from Correa and, rather stumbling as he shot, found the bottom-left corner from 15 yards.
Barcelona were level in the 51st minute, Suarez laying off to Messi who rode a challenge from Stefan Savic on the edge of the penalty area before planting a powerful right-footed shot into the left corner.
Messi looked to have a second goal just before the hour, collecting a high ball on the edge of the penalty area, and whirring through Atletico defenders before slipping home a fine finish, yet a VAR check showed a handball from the Ballon d'Or winner.
Griezmann then had his moment, winning a race to the ball to nod home from five yards after Oblak made a stunning parry from a Suarez header.
Barcelona thought they had pulled 3-1 clear when Messi's chipped free-kick was jabbed across goal by Arturo Vidal and Pique smashed in from close range.
Yet VAR again denied them, the call so marginal it was barely perceptible.
Almost from nowhere, Atletico were handed a route back into the match when Neto was left exposed and tripped Vitolo, Morata making no mistake from 12 yards.
Atletico wanted a second penalty when Morata's cross hit Pique's right hand moments later, and they looked to have a case, but this time Barcelona were spared. Diego Simeone, on the touchline, was far from impressed.
Simeone was jumping for joy soon after though as Correa struck, Neto getting his body in the way of the ball but unable to make enough contact to prevent it bouncing over the line.
What does it mean? Memo to Barcelona - a football match lasts 90 minutes
It seems bewildering that Barcelona lost this football match. Messi was magnificent, the front three were terrific together, the team had 72 per cent of possession over the piece, led the shots count 16-6 and out-passed Atletico 698 to 266. But Barcelona effectively switched off with 10 minutes to go and Atletico began to slice through their defence with ease. Ernesto Valverde, the Barcelona coach, will want an explanation from his team, and he might owe one to supporters and his own bosses.
Messi was majestic
Sure, he is often majestic. But do not let the finish to this match persuade you that Messi did not contribute enough to the Barcelona cause. A splendid goal, another one of similar beauty that would have been awarded in the pre-VAR era, a deft free-kick that created the second disallowed Barcelona goal, and a threat all night to Atletico. He tortured them. He ran the show. And he walked off at 90 minutes on the losing side. The Saudi crowds were dazzled by him, but somehow Messi does not have a game this weekend.
So Mr Valverde, what happened there?
Barcelona were sauntering towards the final when they suddenly became porous, and never mind those two late goals, Atletico might even have had more in the closing minutes. It seemed the Barcelona defence considered the job done, because how else can their collective failure at the end be explained? Pique was a shambles late on, but he was not the only one.
Atletico and Real Madrid will bring their Spanish capital rivalry to the Arabian Peninsula this weekend. Barcelona, needing a lesson in how to close out a match, go home. Their next match is scheduled for Sunday January 19 against Granada.