Barcelona needed a hero and Lionel Messi is familiar with that role.

Not even a sore hamstring stopped him from helping Barcelona rally Wednesday for a 1-1 draw with Paris Saint-Germain and a place in the Champions League semifinals.

Barcelona advanced on away rule after its 2-2 draw in Paris last week meant the quarterfinal finished 3-3 on aggregate. But Barca showed just how much it depends on Messi against major opponents.

Messi, who injured his right leg after scoring in their first match, was only cleared to play an hour before kickoff. He came on in the 62nd minute with his team losing 1-0 after Javier Pastore's goal, and struggling to find its form.

It took him nine minutes to start the decisive move that Pedro Rodriguez finished to put Barcelona into a sixth straight semifinal and on course for a fourth Champions League title in eight seasons.

"Messi is a very important player and he put in a great effort," Pedro said. "He was the catalyst. We changed after he came on and we have to thank him for that."

In the other match, Bayern Munich beat Juventus 2-0 to go through on 4-0 aggregate to join Barcelona, Real Madrid and Borussia Dortmund in the semifinals.

Messi has dominated many a match for Barcelona on its way to trophy success in recent seasons, and Barcelona certainly was a different team with Messi, even if he was not at full strength. Before he entered the game, Barca was a lackluster side that PSG toyed with.

"Leo is an extraordinary player. We knew that we had the option of playing him if the score wasn't favorable," Barcelona assistant coach Jordi Roura said. "Leo knows when to push it and when to put the brakes on. Not being 100 percent, he still has the same attitude and motivation to win."

Early on, PSG was the more concise side, needing to score with Barcelona holding the away-goals advantage. Pastore put PSG ahead when he worked a one-two with Zlatan Ibrahimovic on a break to beat the offside trap before holding off Dani Alves and using his left foot to scoop the ball over sliding goalkeeper Victor Valdes.

But once the four-time world player of the year went in, Barcelona snapped into action, scored the decisive goal, and controlled the rest of the match.

"You could argue that we shouldn't have (been eliminated)," said PSG coach Carlo Ancelotti. "In the first half we could have scored. We had two or three good chances, and when we did score we could have added another. Messi going on gave his teammates, and the fans, a boost of confidence, even if he wasn't 100 percent."

David Beckham started the first leg for PSG, but Ancelotti left him on the bench until the 83rd minute for Wednesday's match.

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino