The Mets' Michael Conforto celebrates his two-run home run with Jason...

The Mets' Michael Conforto celebrates his two-run home run with Jason Vargas next to Nationals catcher Matt Wieters during the third inning of a game on Thursday in Washington. Credit: AP/Nick Wass

WASHINGTON – Max Scherzer set the Nationals record for strikeouts in a season with his 285th when he fanned Jason Vargas for the first out of the fifth inning on Thursday night.

So he’s got that going for him.

But one thing Scherzer may not have going for him in November is a fourth Cy Young Award. The Mets hurt Scherzer’s chances — and helped Jacob deGrom's —by keeping him from an 18th victory and went on to a 5-4, 12-inning win at Nationals Park.

Scherzer left trailing 3-2 and got a no-decision. The Mets took a 4-2 lead into the eighth, but the Nationals scored twice to tie it.

The Mets took a 5-4 lead in the 12th on pinch hitter Jose Lobaton’s one-out sacrifice fly. It was Lobaton’s first big-league plate appearance since June 2.

Scherzer, who struck out 13 in seven innings and has 290 for the season, is 17-7. His ERA rose from 2.53 to 2.57.

DeGrom, who will start against righthander Joe Ross on Friday night, is 8-9 with a major-league best 1.78 ERA.

Scherzer won the last two NL Cy Young Awards to go along with the AL Cy Young Award he captured in 2013 with the Tigers. Aaron Nola of the Phillies is the other leading NL Cy Young candidate. He is 16-5 with a 2.44 ERA after allowing two runs in 5 2/3 innings to the Mets in a no-decision on Tuesday.

Michael Conforto (two-run shot) and Jay Bruce hit back-to-back homers off Scherzer in the third inning as the Mets took a 3-0 lead.

“We kept on saying, ‘Keep on him, keep on him, keep on him,” manager Mickey Callaway said. “Unfortunately, it’s Scherzer, and that’s not easy to do. To do what we did was pretty good. To keep on scoring off a guy like that’s pretty tough. Really proud of the guys and the job they did tonight.”

Vargas allowed two runs in 5 2/3 innings and left with a chance for his seventh win. That went away when the Nationals tied the game. Vargas (6-9) has two fewer victories than deGrom despite a 6.25 ERA. If deGrom gives up 100 earned runs against the Nationals on Friday and does not record an out, he  still would have a better ERA (6.24) than Vargas.

Vargas opened the third inning with a single and scored two batters later when Conforto sent his 27th home run to the Mets bullpen in left-center. Conforto has 13 homers in his last 39 games. Bruce followed with his ninth, a long drive to center that made it 3-0.

Anthony Rendon made it 3-2 with a two-run homer with one out in the sixth, but the Mets added a run in the eighth on Jeff McNeil’s triple and Bruce’s RBI single.

Washington tied it in the eighth on Rendon’s RBI groundout and Juan Soto’s run-scoring double off Robert Gsellman. Both runs were charged to Anthony Swarzak, who started the inning.

Callaway was ejected by plate umpire D.J. Reyburn in the 10th for arguing a strike call on a bunt attempt by McNeil. It’s the rookie manager’s second ejection of the season. Reyburn also ejected Bryce Harper in the 12th after calling him out on strikes.