PARIS (AP) — Lionel Messi helped Barcelona gain a slight edge in its Champions League quarterfinal with Paris Saint-Germain, then limped off after injuring a hamstring.
Blaise Matuidi scored on the last kick of the game, giving PSG a 2-2 tie Tuesday night in the first leg of the total-goals series.
Messi, the four-time FIFA Player of the Year, scored his 57th goal of the season in the 38th minute, then favored his right leg in the final minutes of the first half and was replaced by Cesc Fabregas at the start of the second. Barcelona said Messi will undergo tests Wednesday on his right hamstring.
Barcelona defender Javier Mascherano left on a stretcher in the 84th minute after tearing the medial collateral ligament in his right knee during a collision with teammate Jordi Alba. Already missing injured defenders Carles Puyol and Adriano Correia, Barcelona said Mascherano will be sidelined for six weeks.
"We've paid a heavy price, because we've lost Messi, and Mascherano for probably six to eight weeks," Barcelona assistant coach Jordi Roura said. "Of course it will be a big loss if we lose Messi, the best player in the world. But we have Cesc and other options, so we are confident from that point of view."
Xavi Hernandez also scored for Barcelona, and Zlatan Ibrahimovic got PSG's first goal.
In Tuesday's other game, Bayern Munich defeated visiting Juventus 2-0 on goals by David Alaba 25 seconds in and by Thomas Mueller in the 63rd minute.
The second legs of the total-goals series are April 10 in Spain. If the aggregate score is tied, away goals are used as a tiebreaker.
"It's going to be tough there, but it's not going to be impossible," PSG midfielder David Beckham said.
In Wednesday's first legs, Real Madrid hosts Galatasaray and Borussia Dortmund is at Malaga.
Hoping to become one of Europe's top clubs, PSG has spent over $320 million to acquire players since the Qatar Investment Authority took control of the team in 2011. Barcelona, which has won three of the last seven Champions League titles, is considered by many to be the standard.
The Blaugrana went ahead when Messi scored his eighth Champions League goal of the season on an angled left-footed shot from 8 yards following a one-hop flick from Dani Alves. It was the 59th goal of Messi's Champions League career, second only to Raul Gonzalez's 71.
"Whether or not Messi is there for the return match we will have the same approach," PSG coach Carlo Ancelotti said. "We need to go to Barcelona to score at least two goals, so the attitude will be the same."
Ibrahimovic tied the score in the 79th minute with his 30th goal this season. Thiago Silva headed Jeremy Menez's free kick off a post, and Ibrahimovic scored against his former team by knocking in the rebound with his left foot from 4 yards while in an offside position.
Xavi put Barcelona back ahead in the 89th with a penalty kick awarded by German referee Wolfgang Stark after goalkeeper Salvatore Sirigu tripped Alexis Sanchez.
"The first goal was a gift we gave to Messi. The second was a gift from the referee," Ancelotti said.
Matuidi, who will be suspended for the return leg after getting a yellow card, retied the game in the fourth minute of stoppage time. Christophe Jallet lofted the ball into the penalty area, where Ibrahimovic knocked it down. Matuidi's low shot from 18 yards deflected off Marc Bartra and past the outstretched right arm of diving goalkeeper Victor Valdes.
Barcelona coach Tito Vilanova was back in charge for the first time since returning from a 10-week stay at New York's Memorial Sloan-Kettering Cancer Center following surgery on a saliva gland tumor in Spain in December.
Beckham made just his third start for PSG, and the 37-year-old midfielder was given a yellow card for a late sliding tackle from behind on Sanchez in the 68th minute.
"I put Beckham there because he has the ability to play forward passes and change the play," Ancelotti said. "He played really well with good passes, changing sides."