Barcelona had every reason to be confident heading into its two-leg Champions League quarterfinal against Roma. The mere presence of Lionel Messi, by most accounts the greatest player of his generation, will do that. And Roma hardly struck fear into the five-time European club champion, considering its position well back of Serie A leaders Juventus and Napoli and its comparatively undistinguished Champions League track record.

And so we got headlines like this in the Catalan press after the quarterfinal draw last month, with one periodical comparing Roma to a easily consumed confection, an appetizer to the main course of the semifinals, where one of Europe’s true powers — Real Madrid, Bayern Munich, whoever — would be waiting:

Then Barcelona went out and clubbed Roma, 4-1, at home in the first quarterfinal leg on April 4. All the La Liga titan had to do was not lose by three goals in Tuesday’s second leg. As tasks go, this one seemed hardly taxing.

But by now you’ve heard the story if you’re at all cognizant of the worldwide soccer scene: Roma dominated Barcelona in a 3-0 victory, forcing a 4-4 tie in aggregate goals. That lone goal I Giallorossi scored in their humiliating defeat the week before at Camp Nou suddenly became the most important goal in the club’s recent history, for it gave them the away-goals tiebreaker. Roma was on to the semifinals of Europe’s top club competition for the first time since 1984, and the Barcelona newspapers suddenly were not writing headlines about bonbons.

“Total failure in Europe,” exclaimed Marca, also noting Manchester City Coach Pep Guardiola’s failure to beat Liverpool. “Disaster in Rome.”

“Disaster no excuses,” wrote Sport.

Meanwhile, it Italy: “Roma, the myth” and “Ecstasy Roma!”:

Italy gets another chance to exult on Wednesday when Juventus plays Real Madrid in its second quarterfinal leg. Juve lost the first leg at home, 3-0, and needs a miracle. Stranger things have happened.

Read more from The Post: