Jayne Kamin-Oncea-USA TODAY Sports

Brandon Nimmo hit a two-run home run and the New York Mets overcame the ejection of starter Max Scherzer to earn a 5-3 victory over the host Los Angeles Dodgers in the finale of a three-game series Wednesday.

Nimmo finished 5-for-5.

Scherzer was ejected before the bottom of the fourth inning by crew chief Phil Cuzzi after a second examination of his glove. The veteran already was ordered to change gloves after an examination before the bottom of the third inning.

Former Met Noah Syndergaard (0-3) went six innings for the Dodgers, giving up two runs on five hits with two walks and two strikeouts. It was his first start against the Mets after pitching six seasons with the club.

David Peralta hit a home run and drove in two runs as the Dodgers managed five hits against six Mets pitchers.

The game opened as a scoreless duel between pitchers facing their former teams. Scherzer pitched the final two months and the playoffs for the Dodgers in 2021. It was scoreless through three innings before the Dodgers broke through immediately after Scherzer's ejection.

The Mets pivoted to right-hander Jimmy Yacabonis and the Dodgers scored the first run of the game on a one-out double from Jason Heyward, a single from Miguel Vargas and Peralta's sacrifice fly for a 1-0 lead.

Scherzer gave up one hit over three scoreless innings, with two walks and three strikeouts over 47 pitches. Yacobonis (2-0) gave up one run on two hits and one walk in 2 2/3 innings.

New York broke through in the fifth inning against Syndergaard on a single from Francisco Alvarez and a two-out home run to right-center field by Nimmo, his first of the season.

Tommy Pham's sacrifice fly in the eighth inning gave New York a 3-1 advantage.

J.D. Martinez had an RBI double in the eighth for Los Angeles, while Mark Canha added a two-run double for New York in the ninth.

Mets right-hander Adam Ottavino pitched the ninth inning for his third save, giving up Peralta's home run.

The Mets' victory came one day after their five-game winning streak ended. They are 5-1 on a 10-game California trip that concludes at San Francisco.

The Dodgers lost for the eighth time in 12 games.

More must-reads:

TODAY'S BEST
Nuggets teach Timberwolves it's never easy to knock out the champion
Panthers come from behind to take Game 4 vs. Bruins
Hawks win 2024 NBA Draft Lottery
Watch: Padres star passes father on all-time home runs list
Terrion Arnold honors his mother in a unique way
Brad Keselowski breaks 110-race winless streak at Darlington
Watch: Manchester United ties record, highlighting club's ineptitude
Celtics' Jrue Holiday praises overlooked aspect of Jayson Tatum's game
Arturs Silovs' 42 saves lead Canucks past Oilers in Game 3
Braves star leaves game early due to left side soreness
Pacers blow out Knicks on Mother’s Day, even series at 2-2
Hawks GM 'shocked' that his team won the NBA Draft Lottery
Prolific former Brewers, A's slugger announces retirement
Saints to sign veteran offensive lineman
Smother's Day: Pacers shut down Knicks in first half of Game 4
Flyers goaltender suspended from international play for three years
Pistons make wrong kind of history at NBA Draft Lottery
Watch: Pacers C Myles Turner makes absurd three-pointer in first quarter vs. Knicks
Giants place key outfielder on injured list
Broncos release former Super Bowl champion WR