Marc-Andre ter Stegen’s heroics ensured Barcelona edged past Real Sociedad on penalties on Wednesday to reach the Spanish Super Cup final, without the injured Lionel Messi.

Messi was watching on as Ter Stegen did his best to fill the void in Cordoba, the goalkeeper immense both in the shoot-out and during normal time, which had finished 1-1.

Frenkie de Jong’s header was cancelled out by a penalty from Mikel Oyarzabal, who then missed in the shoot-out, one of two crucial saves made by Ter Stegen before 21-year-old Riqui Puig hit the winning shot.

“I wasn’t down to take one but we needed one more taker and I stepped forward,” said Puig.

Barca advance to meet either Real Madrid or Athletic Bilbao in the final on Sunday, when Messi is expected to be available again, although coach Ronald Koeman was cautious at full-time.

“We have to wait,” he said.

Koeman’s team have a mountain to climb in La Liga’s title race but they are improving, now nine games unbeaten and with a trophy in their grasp.

This is the second year of the Spanish Super Cup’s new format, which has four teams playing each other in a semi-final and final.

Athletic Bilbao and Real Sociedad joined after reaching the final of last season’s Copa del Rey, which is still to be played, while Barcelona finished runners-up to Madrid in La Liga.

Yet while last season’s version controversially took place in Saudi Arabia, the pandemic means this year’s semis are in Cordoba and Malaga, with the final to be played in Seville.

Barca were the better side in the first half but had Ter Stegen to thank for not conceding early as Alexander Isak sped into the area only to see his chipped finish saved by the goalkeeper.

It was De Jong’s dash to the near post that brought the first goal, an Antoine Griezmann cross hanging just long enough for the midfielder to get there first and direct a superb header in.

Yet De Jong gave Real Sociedad a way back just after half-time, the ball striking him on the hand and allowing Oyarzabal to equalise from the spot.

Barca nearly pulled ahead instantly as De Jong swivelled in the box, only to take an unnecessary extra touch. Ousmane Dembele fired just wide and Trincao, on as a substitute, also had a chance to win it before the 90 minutes were up.

Zaldua unleashed in extra time but Ter Stegen tipped over. Dembele’s finish was saved too while Adnan Januzaj poked wide at the end of a brilliant run and then hit the post with a free-kick.

Into the shoot-out, and Jon Bautista’s first attempt was parried away by Ter Stegen, only for De Jong to hit the post.

But Oyarzabal, who had scored earlier from the spot, this time missed, Ter Stegen guessing right again. Dembele scored before Willian Jose struck the post. Miralem Pjanic tucked in and so did Mikel Merino under pressure.

Griezmann could have won it but ballooned over before Januzaj converted for 2-2, which left it up to Puig to win it for Barca, the youngster slamming home for a spot in the final.