Barcelona needed a Pedro equaliser to draw 1-1 with Paris St Germain in their Champions League quarter-final, second leg and advance to the last four on away goals.
Without Lionel Mressi,Barca lacked cutting edge and PSG had much the better of the first half before Javier Pastore raced clear five minutes after the break and lifted the ball over Victor Valdes into the net.
Messi replaced Cesc Fabregas with half an hour left and was involved in the buildup to Pedro's 71st-minute strike to make it 3-3 on aggregate
With this win, Barca secured a sixth straight semi-final appearance in Europe's elite club competition.
Bayern Munich weathered an early Juventus storm before Mario Mandzukic headed a second-half goal to help the Germans to a 2-0 win at Juventus send them into the Champions League semi-finals.
Juventus, chasing a 2-0 deficit from the first leg of the quarter-final tie huffed and puffed but were not quite creative enough to cause Munich more than the odd scare.
The fate of the game was sealed when substitute Claudio Pizarro netting again for Bayern in injury time.