(CNN) -- Barcelona may not be the force it once was -- but it still had too much for Manchester City.
City, which has now exited both the FA Cup and Champions League in the past week, was always going to find life difficult after losing the first leg of its Champions League last-16 tie.
Trailing by two goals and with the knowledge that no club has ever managed to progress after suffering a 2-0 defeat at home in the first leg of the competition, City at least gave it a real go in a pulsating contest at the Camp Nou.
In the end, despite plenty of courage and endeavor, goals from Lionel Messi and Dani Alves decided this tie as Barcelona gained a 2-1 win to progress 4-1 on aggregate.
Vincent Kompany had briefly leveled the game with a minute of normal time remaining before Alves struck -- and City finished the game with 10-men after Pablo Zabaleta was sent off.
"We've got nothing left in the tank, we gave everything," Kompany told Sky Sports.
"We could have scored earlier which would have changed the game.
"You have to take your half chances against the best teams. Over the course of the two games there was not much between the sides. Lionel Messi is incredible player but outside of that it was even.
"Only the winners get remembered but it's only our third season in the Champions League.
"The way we have played means we should fear nobody next season and our time will come."
Much had been made of Barcelona's supposed fragility under Tata Martino and its recent defeats by Real Sociedad and Real Valladolid.
Martino, who replaced Tito Vilanova at the start of the season, has come under increasing pressure with his team four points off league leader Real Madrid.
But here, his team had too much for City, even if some doubts remain about its ability to challenge the likes of Bayern Munich and Real for the trophy.
It was City which started the better of the two but the visitor soon began to ride its luck as Barcelona grew frustrated at the decisions of the officials.
With manager Manuel Pellegrini sat in the stands after being handed a touchline ban following his disparaging remarks about Swedish referee Jonas Eriksson, who presided over the first leg, City was left in the hands of assistant Ruben Cousillas.
Not that there was much Cousillas could do as Barcelona began to turn the screw.
First, the home side felt it should have been awarded a penalty when Messi went down under the challenge of Joleon Lescott but referee Stephane Lannoy waved away the appeals.
If that decision was marginal, what followed was hugely fortunate as the assistant referee deprived Barcelona of what would have been a perfectly legitimate goal.
Messi found Xavi and when the midfield maestro slipped in Jordi Alba, the full-back crossed for Neymar to tap the ball into the empty net.
Unfortunately for Barcelona, the offside flag had been raised, despite Alba clearly being in an onside position.
Having survived the early scare, City slowly found their feet and should have taken the lead four minutes before the interval.
Yaya Toure, formerly of Barcelona, picked out David Silva and when the Spaniard's sublime flick found Samir Nasri, the City midfielder could only shoot straight at Victor Valdes.
The second half provided more enthralling action with Messi coming within inches of breaking the deadlock after jinking his way into the penalty area before smashing an effort against the post.
At the other end, Edin Dzeko, on as a halftime substitute for the injured Sergio Aguero, sent a looping header towards goal which was brilliantly clawed away by Valdes with the ball seemingly destined for the corner.
Pablo Zabaleta then fired wide as City threatened to plunder the goal that their play had deserved.
As City pushed forward in search of that elusive opener, Barcelona began to make the most of the space left behind.
And it came as little surprise when Messi finally broke through, clipping the ball past Joe Hart to score his 67th Champions League goal.
There was still more drama to come with a little over 12 minutes remaining when Dzeko appeared to be blatantly fouled inside the penalty area by Gerard Pique -- but referee Lannoy disagreed.
Such was City's anger that Zabaleta was shown a second yellow card and promptly dismissed for voicing his frustration.
City did net an equalizer through Kompany with a minute of normal time remaining to salvage some pride.
But Barcelona refused to be denied and Dan Alves netted a late winner, firing home from Andres Iniesta's pass to secure victory.
"It was a very tight game against a world class team," Barcelona's Cesc Fabregas told Sky Sports.
"It was a great result to win 2-0 over there and today it was tough.
"We created a lot of chances, we had a goal which was onside ruled out and could have had a penalty.
"We go home happy. The last couple of games have not made us happy, we had some negative results but we have to be proud of today's result.
"Everything is good at the club. We are in the final of the cup, we are four points behind in the league and in the last eight of the Champions League. A lot of teams would swap."
Messi, who scored his 28th goal of the season, believes this result proves Barcelona is on the way back to finding its best form.
Barca, which sits third in La Liga, faces Osasuna this weekend before traveling to Madrid for 'El Clasico' on March 23.
"I think tonight we got back to being the Barcelona that we all want to see and we were able to beat a very tough opponent," he told Canal Plus.
"I don't know if the criticism (in the media after the La Liga defeat to Valladolid) was over the top. We are the first to criticize ourselves and we didn't play the way we should have done there.
"We don't let the criticism affect us and we just focus on ourselves and try to turn things around and that's what we did tonight, I think."
In the night's other game, Paris Saint-Germain secured its place in the last eight with a 2-1 win over Bayer Leverkusen to secure a 6-1 aggregate victory.
After Sidney Sam had given the German side a surprise lead, PSG hit back through Marquinhos, who headed home from close range.
Simon Rolfes than missed a penalty for Leverkusen before Ezequiel Lavezzi sealed the win for the French champion.
Leverkusen ended the contest with 10-men after Emre Can was shown a second yellow card for diving.