Royer netted the game-winning goal by teaming up with Bradley Wright-Phillips, who was honored after the game for scoring his 100th career last month.

Wright-Phillips raced past the defense and kicked the ball to Royer through the box as Los Angeles defender Laurent Ciman was late in covering. As goalkeeper Tyler Miller sprawled to the ground, Royer lifted a right-footed shot into the net for his eighth goal of the season.

Royer celebrated his third career multi-goal game with two backflips and a fist pump. He then received a loud ovation after being replaced a minute later.

Royer scored for the second straight game and also tallied in the 39th minute as the Red Bulls (14-6-2, 44 points) moved into a tie for second place in the Eastern Conference with rival NYCFC, whom they play Aug. 22 at Yankee Stadium.

Diego Rossi scored in the 53rd for LAFC (10-6-6, 36), which is tied for third in the Western Conference with Sporting Kansas City. The expansion club is six points behind conference-leading FC Dallas after falling to 0-2-2 in the last four games since a 4-1 win over Orlando City on July 7.

New York’s Luis Robles made two saves while Miller made three.

The Red Bulls took a 1-0 lead in fluky fashion in the 39th minute.

Alejandro Romero Gamarra lifted a pass over the defense to Wright-Phillips, whose shot was then stopped by Miller. But the goalkeeper couldn’t hold on to the ball, allowing Royer to control the ball and fire it while on the ground.

Rossi, who had numerous chances in the first half, tied the game after eluding three defenders, taking the pass from Carlos Vela and putting the ball into the right side of the net.

Wright-Phillips almost scored 25 seconds into the game and Rossi nearly scored in the 19th minute but was stopped by Robles, who made a sprawling save.