Lionel Messi has never been short on late-game heroics, and not even a sore hamstring stopped him from going on as a substitute to help Barcelona rally for a 1-1 draw with Paris Saint-Germain and a place in the Champions League semifinals on Wednesday.

Barcelona advanced on the away goals rule after its 2-2 draw in Paris last week meant the contest finished 3-3 on aggregate, but not without showing just how much it depends on Messi against major opponents.

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

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

Messi has dominated many a match for Barcelona on its way to trophy success in recent seasons, but his importance and leadership for the Catalan club was rarely more evident than on Wednesday night.

"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."

Barcelona was a different team with Messi — despite not being at full strength— compared to the lacklustre side that PSG toyed with while the Argentina international watched from the dugout.

Also on Wednesday, Bayern Munich beat Juventus 2-0 to go through 4-0 on aggregate. Real Madrid and Borussia Dortmund are the other semifinalists in Friday's draw.

Sloppy team without Messi

Barcelona was almost unrecognizable for stretches in the first half without its star, as it lost its nerve and became sloppy in its trademark passing.

Besides Xavi Hernandez's second-minute free kick which just missed, PSG proved the more incisive side, needing to score with Barcelona holding the away-goal advantage.

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

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

PSG's main threat in the early stages was striker Ezequiel Lavezzi, who forced goalkeeper Victor Valdes into action twice before the quarter-hour mark, while Lucas sailed a long shot over the bar in the 19th.

Barcelona was limited to Andres Iniesta's incursions and Pedro's attempt that hit the side-netting from a tight angle.

Lavezzi had a good chance in the 24th when Zlatan Ibrahimovic, who excelled as a playmaker all game, put him through the Barcelona defence. However, Valdes was able to block the low ball he had poked toward the goal and Pique scrambled to clear the rebound.

PSG came close to an upset

PSG's surge rattled Barcelona, which uncharacteristically started to err in its normally crisp passes, and Lucas gave the Camp Nou crowd another scare with a header that Valdes swatted away after Ibrahimovic had picked the Brazilian out in the area.

"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 per cent."

A clever run by Lucas earned Adriano a yellow card in the 42nd, giving him a one-game suspension.

Pastore put PSG ahead when he worked a one-two with Ibrahimovic on the break to beat the offside trap, before holding off Dani Alves and using his left foot to scoop the ball over the sliding Valdes.

Messi immediately pulled up his socks on Barcelona's bench and soon started to warm up on the touchline — to cheers from the home fans.

After Dani Alves had sent a shot high from inside the area, huge applause greeted Messi when he went on for Cesc Fabregas.

Barcelona responded and started to pepper PSG's goal with shots from Pique and Iniesta, but Messi fluffed his first opportunity when he lost control while taking aim after a rebound had fallen to him in the box.

Messi soon made up for his miscue, though, when he sped past two defenders into the area and passed for David Villa, who then laid the ball off to Pedro with a clever backpass that the forward rifled into the corner of the net with a left-footed strike to restore the hosts' lead in the tie.

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