Jose Lobaton hit a go-ahead sacrifice fly against his former team in the 12th inning and the New York Mets beat the Washington Nationals 5-4 on Thursday night.

Lobaton, who spent the previous four years in Washington before signing with the Mets in December, lofted a one-out fly ball off Jefry Rodriguez (3-3) with the bases loaded to score Amed Rosario.

Jacob Rhame (1-2) worked two scoreless innings, and Paul Sewald pitched the 12th for his second save.

Washington Nationals' Victor Robles (16) is out at first by New York Mets first baseman Jay Bruce, left, during the third inning of a baseball game, Thursday, Sept. 20, 2018, in Washington. (AP PhotoNick Wass)

Washington Nationals' Victor Robles (16) is out at first by New York Mets first baseman Jay Bruce, left, during the third inning of a baseball game, Thursday, Sept. 20, 2018, in Washington. (AP PhotoNick Wass)

Nationals outfielder Bryce Harper was ejected in the 12th for arguing home plate umpire D.J. Reyburn's called third strike.

Washington starter Max Scherzer pitched seven innings, allowing three runs while striking out 13. He has 290 strikeouts this year, the most for a National since the franchise relocated from Montreal before the 2005 season. Scherzer set the previous mark of 284 in 2016.

However, he never held a lead Thursday. Michael Conforto smashed a two-run homer to left in the third, his 27th of the season. It was also his fourth home run in 23 career at-bats against Scherzer.

Four pitches later, Jay Bruce crushed his ninth home run of the season. It was the sixth time this season New York has hit back-to-back homers.

Washington's Trea Turner led off the sixth with an infield single. Two batters later, Anthony Rendon golfed Jason Vargas' changeup to deep left for his 100th career home run to narrow the deficit to 3-2. Vargas allowed two runs and struck out eight over 5 2/3 innings.

Jeff McNeil led off the eighth with a triple and scored two batters later when Bruce punched a single to right past a drawn-in infield. But the Nationals responded with Rendon's run-scoring groundout and Juan Soto's RBI double off Robert Gsellman in the bottom half of the inning.

Mets manager Mickey Callaway was ejected in the 10th inning for arguing after Reyburn ruled McNeil had offered on a bunt attempt.

TRAINER'S ROOM

Mets: INF Wilmer Flores will miss the rest of the season with soreness in both knees. Callaway said Flores has early onset arthritis in both knees and will receive injections to alleviate the pain. "It's not like surgery is recommended at this time," Callaway said. "I think rest and a couple injections is supposed to knock this out pretty good."

UP NEXT

Mets: RHP Jacob deGrom (8-9, 1.78 ERA), who is 5-1 with a 2.76 ERA lifetime at Nationals Park, gets the nod for New York as the four-game series continues.

Nationals: RHP Joe Ross (0-0, 3.60) makes his second start since undergoing Tommy John surgery last year.