Lionel Messi lifted Barcelona out of their recent malaise with a magical display as his side beat Tottenham Hotspur 4-2 in a thrilling Champions League Group B clash at Wembley on Wednesday.

Provided with the grandest of stages and 82,000 fans, the Argentine maestro responded by scoring two goals to take his Champions League haul to 105, instigating two others and twice being denied by the same upright.

Messi, 31, was applauded off by both sets of fans after an absorbing advert for the Champions League which left Barca joint top of the group on six points with Inter Milan. Tottenham face back-to-back games against PSV Eindhoven with both teams having lost their first two matches.

Injury-hit Tottenham faced an uphill task against the five-times European champions once Philippe Coutinho scored after two minutes and when Ivan Rakitic’s breathtaking volley made it 2-0 before halftime a hammering looked on the cards.

But Barcelona needed the mercurial Messi at his best to repel a tenacious Spurs fightback as Harry Kane and Erik Lamela gave the hosts, described as “heroes” by their manager Mauricio Pochettino, a glimmer of hope.

Only when Messi struck his second in stoppage-time, his fifth of this season’s tournament after a hat-trick against PSV, could coach Ernesto Valverde breathe a little easier.

“After a few bad results it was important to do well today. Our response was very good,” Valverde, under the cosh after Barca drew two and lost one of their last three La Liga games, told reporters.

“The game was very tense. We had a few problems during the game but we managed to solve them.”

Pochettino said his plan had gone out of the window after his side’s woeful start.

“I’m disappointed with the result but the effort was massive,” he said.

Barcelona were vulnerable so they said, but on a pitch scarred from hosting British heavyweight champion Anthony Joshua’s fight against Alexander Povetkin they took only two minutes to catch Spurs in the solar plexus.

Tottenham allowed Messi time to curl a pass to Jordi Alba on the left and with keeper Hugo Lloris, back from injury, charging out Alba cut the ball back to Coutinho who drilled home through a gaggle of defenders.

The hosts responded with Kane firing in a shot that did not have enough venom to worry Marc-Andre ter Stegen.

PERFECT VOLLEY

Messi opened up Tottenham again in the 28th minute. His floated pass was chested down by Luis Suarez to Coutinho whose volley sliced up in the air before the quick-thinking Brazilian hooked the ball back to Rakitic who rifled a picture-perfect right-foot volley in off the post from 25 yards.

Messi, who scored for Barca in the 2011 final against Manchester United at Wembley, revelled in the wide-open spaces and twice sliced through the Spurs defence shortly after the break, thudding shots against Lloris’s right post.

Instead of being 4-0 down, however, Tottenham striker Kane halved the deficit in the 52nd minute with a clinical finish.

Messi shook his head in disbelief but soon silenced the home crowd again — this time side-footing inside the post from Alba’s cross to finish a flowing move he started.

There was no let-up and after Kane worked hard to win the ball, Lamela gave Spurs another lifeline when his 66th-minute shot flicked off Clement Lenglet and past Ter Stegen.

A gallant Tottenham side, missing the likes of Dele Alli, Christian Eriksen and Jan Vertonghen, almost levelled when Lucas Moura’s shot deflected wide but Messi ended their resistance after again being picked out by Alba.