Zlatan Ibrahimovic scored one goal and set up the other as he inspired Paris St-Germain against former club Barcelona in a thrilling Champions League quarter-final first leg match.
The Swede stabbed home from an apparently offside position to cancel out Lionel Messi's well-made opener.
Xavi's 89th-minute penalty after Salvatore Sirigu fouled Alexis Sanchez seemed to have secured Barca's win.
But Ibrahimovic's 94th-minute knock-down was swept home by Blaise Matuidi.
It was a disappointing end for Barcelona, who had lost Messi to a hamstring strain at half-time and Javier Mascherano to another injury in the second half.
Beckham's key moments in his 106th Champions League game
- 11 mins
- finds Christophe Jallet with a long ball, who in turn sets Lucas Moura free down the right.
- 12 mins
- Beckham's corner is headed into the ground by Alex.
- 18 mins
- Zlatan Ibrahimovic prevails in the discussion over who will take a free-kick 25 yards from goal.
- 38 mins
- Beckham is the last PSG player to touch the ball before Messi's opener
- 46 mins
- begins the second half with two fine cross-field passes to Jallet and Maxwell.
- 67 mins
- mis-times a tackle on Alexis Sanchez to go into the book.
- 69 mins
- Leaves the field to applause as Marco Verratti comes on.
Those injuries combined with Ibrahimovic's performance against a team where he had an unhappy 2009-10 season may have dominated the post-match discussion, but it was the inclusion of 37-year-old David Beckham in PSG's starting line-up that caught the eye before kick-off.
The selection of the former England captain, ahead of the 20-year-old Marco Verratti, looked questionable as Barcelona monopolised possession in an ominous opening, but Beckham went on to have a solid 70 minutes in a deep-lying midfield role.
Despite their early dominance, Barca looked vulnerable at the back and almost conceded from PSG's first attack as a flustered Sergio Busquets poked the ball against the frame of his own goal.
The home side's game plan initially confounded Barca with Beckham and the industrious Matuidi sitting deep and launching swift counter-attacks towards a dangerous front quartet of Ibrahimovic, the impressive Lucas Moura, and Argentine pair Ezequiel Lavezzi and Javier Pastore.
Barcelona were limited to wayward long-range efforts from Andres Iniesta and Alexis Sanchez, before a moment of brilliance converted their time on the ball to a score on the board.
Despite Messi's neat finish for his 57th goal of the season, Dani Alves's delicious pass, off the outside of his right foot, to slice open the defence stole the show.
Messi escaped the attentions of the excellent Thiago Silva once more to curl narrowly over but it was to be his final contribution as he hobbled out of the action with a right hamstring strain that will be assessed over the next 24 hours.
Former Arsenal midfielder Cesc Fabregas came on in place of Messi, but without the Argentine's attacking menace on the pitch Matuidi was able to push forward.
Ibrahimovic almost scooped the ball cleverly into the path of the PSG midfielder, who will miss the return leg after picking up a booking, but Gerard Pique was quick enough to make up the ground.
Sanchez had wasted two openings for Barca before Ibrahimovic, coming from an offside position, poked in after Thiago Silva's header hit the post.
With a minute of normal time left, Xavi coolly converted from 12 yards after Sanchez had been felled by Sirigu's needless charge from goal.
But Ibrahimovic, whose flick-on had almost played in Kevin Gamiero minutes before, had the final word as he nodded the ball into the path of Matuidi whose shot squirmed past Victor Valdes after going through the legs of Barca substitute Marc Bartra.
- 30 Sirigu Booked
- 02 Thiago Silva
- 13 Alex
- 17 Maxwell
- 14 Matuidi Booked
- 26 Jallet
- 29 da Silva Lucas
- 32 Beckham Booked (Verratti - 70' )
- 11 Lavezzi (Menez - 66' )
- 18 Ibrahimovic Booked
- 27 Pastore (Gameiro - 76' )
- 01 Douchez
- 03 Sakho
- 23 Van Der Wiel
- 20 Chantome
- 24 Verratti
- 07 Menez
- 19 Gameiro
- 01 Valdes
- 02 Alves Booked
- 03 Pique Booked
- 18 Alba Booked
- 06 Xavi
- 08 Iniesta
- 10 Messi (Fabregas - 46' )
- 14 Mascherano Booked (Bartra - 84' )
- 16 Busquets
- 07 Villa (Cristian Tello - 81' )
- 09 Sanchez
- 13 Pinto
- 15 Bartra
- 19 Montoya
- 04 Fabregas
- 11 Thiago
- 25 Song
- 37 Cristian Tello