NEW YORK — Mets ace Max Scherzer removed himself from his start Wednesday night against the St. Louis Cardinals with what the team said was left side discomfort.

He will have an MRI on Thursday, the team said.

The three-time Cy Young Award winner left with two outs in the sixth inning and a 1-1 count on Albert Pujols. With two runners on, Scherzer threw a slider in the dirt and immediately signaled to the New York bench that he was done.

Mets pitching coach Jeremy Hefner, manager Buck Showalter and a trainer came out of the dugout to visit Scherzer on the mound. After a quick discussion, the 37-year-old right-hander walked off the field.

Scherzer threw 61 of his 87 pitches for strikes and left with a 6-2 lead against his hometown team. Adam Ottavino was given all the time he needed to warm up, and he struck out Pujols to end the inning.

Scherzer was unable to make his last scheduled start for the Los Angeles Dodgers in last year’s National League Championship Series against the Atlanta Braves because of a tired arm. His first start for the Mets was pushed back a day because of a hamstring issue that cropped up late in spring training; but otherwise, Scherzer has been healthy since signing a three-year, $130 million contract with New York in the offseason.

Off to a terrific start this year, the Mets have been without injured ace Jacob deGrom (right scapula stress reaction) all season, and he isn’t expected back until at least late June or July. His effective replacement, Tylor Megill, went on the 15-day injured list on Sunday with right biceps inflammation.

The Associated Press contributed to this report.