Safety did not finally arrive until the very last minute but when it did it was glorious. Barcelona broke away from deep, Lionel Messi found Alexis and his curling pass reached Jordi Alba screeching up the left, on one last run. He controlled and finished to make it 4-0 on the night, 4-2 on aggregate, adding to two goals from Messi and one for David Villa to complete a breathtaking comeback and reach the quarter-finals.

Milan three weeks ago was forgotten, the end of an era postponed. There was relief but there was also redemption. This was a brilliant Barcelona performance, bookended by a two goals. It had been a long night; it had also been a perfect one, even the nerves failing to disguise just how well they had played.

Milan hit the post; otherwise, for all the emotion, they created little. Three shots on target to Barcelona's 10 told a story but not the whole, fascinating tale.

Gerard Piqué had talked about the importance of opening up the pitch and circulating the ball with speed to create chances. He had also expressed his hope that Barcelona could score early. Both happened: there was an intensity and velocity absent recently and it took less than five minutes for the home side to score.

Xavi's pass was hit into Messi, hard and low. He took one touch to control and then, with no back-lift, almost just with a flick of the ankle, he sent the ball flying into the corner. The Camp Nou erupted and the enthusiasm in the stands extended to the pitch.

Barcelona screeched round, swift to every ball, passing with as much pace as precision. Talk of a Plan B sometimes misses the point; what they really needed was to get Plan A right. Here, they did. Milan were forced back, asphyxiated, unsettled, the game speeding past them.

Dani Alves pushed up and out to the touchline, Sergio Busquets swept, Xavi looked fit, Messi was decisive. Villa intervened less at first but his very presence changed the dynamics. Barcelona were a swarm. The pressure was back and so were the chances.

Pedro was bundled over by Ignazio Abate and should have had a penalty. Alves and Messi set up Andrés Iniesta, whose shot was superbly pushed on to the bar by Claudio Abbiati. The Milan goalkeeper then forced away Xavi's shot after Iniesta had wriggled free with some maddeningly good footwork.

And all that inside 20 minutes. There was nothing sterile about their possession: 70% in the first half. But a threat always lurked: a Milan goal would leave Barcelona needing four.

Jordi Roura, the assistant coach, called a clean sheet an "obligation" – last Saturday they had managed their first in 14 matches.

After Messi's opener, Roura called for control. However well things went, they knew the threat would never entirely go away. Just before the half-hour Stephan El Shaarawy failed to connect with an overhead kick but that was a warning and for a moment Milan seemed to have emerged from the storm: it had been 10 minutes since Barcelona created a chance and then Milan did from nothing more than an aimless punt.

Javier Mascherano misjudged it, M'Baye Niang ran through and struck a post. Two minutes later Iniesta robbed Massimo Ambrosini to supply Messi, who cut back and struck the ball hard and low through the legs of Philippe Mexès.

As the half-time whistle went it was 2-0 on the night, 2-2 on aggregate. If there appeared to be a dilemma for Barcelona – stick or twist? – they continued to attack.

For all that they now took control, it would take two more goals to truly calm the nerves. They got one quickly; the other would entail an agonising wait. Mascherano reacted quickly to cut out a dangerous ball forward and find Iniesta, and then it went to Xavi, to David Villa. The striker took two touches: one to step inside on his right foot, the other to curl in perfectly with his left. Three goals.

Barcelona walked the tightrope but the platform – safety – drew closer. Massimiliano Allegri sent on Sulley Muntari and Robinho and Milan, obliged to attack, entered the game. Piqué scrambled away, clearances were more often hacked and hurried, and with every lost ball and every Milan attack, however tentative, there was an intake of breath in the stadium.

The linesman's flag denied Alexis the fourth but also stopped Milan often as they tried to spring forward in search of Robinho or Kevin-Prince Boateng.

There were two vital figures on the scoreboard: the score and the time. The clock ticked, nerves were frayed and legs had grown weary.

Barcelona now were the ones forced back but, when it really mattered, there were clear heads. Busquets, superb throughout, had to make one excellent interception and Alba, just yards out, another.

When the clock hit 45, it flashed up a further three minutes of added time. The pitch of the whistles rose. And then it finally happened: Alba made it four. Barcelona had made it.