PARIS (AP) — David Beckham spent his last match as a professional player watching Paris Saint-Germain beat Lorient 3-1 in the final round of the French league on Sunday, while Lyon clinched the remaining Champions League spot and Troyes was relegated.

Beckham wasn't included in PSG's squad, however the former England captain witnessed teammate Zlatan Ibrahimovic score his 30th goal of the season — the most by a player in the league since Jean-Pierre Papin reached that mark for Marseille in the 1989-90 season.

Lyon finished third behind champion PSG and runner-up Marseille after Lisandro Lopez and Clement Grenier scored in a 2-0 win over Rennes, giving the team the last spot in Europe's elite club competition next season.

The top two French teams qualify directly for the group stage, whereas the third-place team enters in the preliminary round of qualifying.

Troyes lost 2-1 at Valenciennes to join Brest and Nancy in the second division as the demoted teams.

Beckham played his final game last weekend when the PSG beat Brest 3-1. Appointed captain for that match, a tearful Beckham received a standing ovation from the crowd at Parc des Princes. He became the first English player to win the championship in four countries, after title successes with Manchester United, Real Madrid and the Los Angeles Galaxy.

On Sunday, Ibrahimovic opened the scoring in Lorient by controlling the ball with his chest and directing it into the net from Kevin Gameiro's cross in the 51st minute. The Sweden striker set up Gameiro for the second goal in the 63rd. Gameiro made it 3-0 with a volley from Argentine playmaker Javier Pastore pass over the top in the 65th.

Lorient fullback Arnaud Le Lan scored a consolation goal from the penalty spot in the 84th after PSG goalkeeper Ronan Le Crom was sent off.

In Lyon, Lopez sent a spot kick into the bottom corner in the 23rd after Rennes defender Onyekachi Apam had handled the ball. Clement Grenier fired a long-range free kick into the top corner in the 69th.

Nice won 2-0 at Ajaccio to leapfrog Saint-Etienne and Lille into fourth place to secure a Europa League spot. Argentine striker Dario Cvitanich scored his 19th goal this season, intercepting a back pass from Felipe Saad to find the net from a tight angle in the 50th. Eric Bautheac added a second goal in the 76th.

Saint-Etienne finished fifth and Lille sixth after the teams drew 1-1. Salomon Kalou scored from close range for Lille in the 42nd. Ronny Rodelin redirected a cross from Dimitri Payet toward Kalou, who beat goalkeeper Stephane Ruffier to the ball to flick home.

Saint-Etienne winger Romain Hamouma equalized with a curling shot in the 59th. The visitors were down to 10 men in the 66th when Josuha Guilavogui was sent off for a foul on Lille midfielder Rio Mavuba.

Lille missed out on a European spot. Saint-Etienne clinched a Europa League berth by winning the French League Cup last month.

Benjamin Nivet gave Troyes some hope by scoring with a low strike in the 12th. But Valenciennes leveled when a header from Benjamin Angoua deflected off Troyes defender Florian Jarjat and into the net in the 68th. Valenciennes forward Gregory Pujol scored the winning goal by converting a pass from Gael Danic in the 88th.

Sochaux secured safety with a goalless draw at Bastia. Marseille also drew 0-0 with Reims to finish 12 points behind leader PSG.

Wissam Ben Yedder celebrated his breakthrough season by netting both goals in Toulouse's 2-0 victory over Montpellier. The young forward dribbled past the goalkeeper to slot into an empty net in the fifth minute and fired into the bottom corner in the 11th to raise his tally to 15 goals this season.

Bordeaux beat Evian 2-1 with goals from Cheick Diabate in the sixth and in the 34th before Evian striker Yannick Sagbo pulled one back on the stroke of halftime.

In a match between two teams that were relegated before the final round, Nancy edged out Brest 2-1.