Max Scherzer celebrates hitting a homer in Tuesday night’s game. He left soon after. (Steve Mitchell/USA Today Sports)

MIAMI — Max Scherzer had just blasted his first career home run Tuesday night, a three-run shot way over the left-field wall at Marlins Park, adding to his extensive list of accomplishments. He was ecstatic as he rounded the bases. His teammates gave him the old ignore-him-in-the-dugout treatment before mobbing him.

Then, a few minutes later, Scherzer took the mound for the second inning. He threw one warm-up pitch. It sailed past catcher Matt Wieters. He then motioned throat slashes to the Nationals’ dugout, signaling he couldn’t go any further and prompting unexpected angst immediately.

“I’m done,” Scherzer told Manager Dusty Baker when he walked out. “I can’t go.”

Scherzer walked off, and left-hander Matt Grace jogged in from the visitors’ bullpen. And just like that Scherzer was done for night. Almost a half-hour later, the Nationals broke from their usual policy of not giving in-game injury updates. A spokesperson said Scherzer had a neck spasm after he “slept on it funny” and took himself out as “a precaution.”

Still, the fact that Scherzer took himself out is harrowing because he has bucked the odds to become perhaps the most durable pitcher in baseball. The 33-year-old right-hander is a perennial innings eater.  He led baseball in innings pitched last season and was leading baseball again this season. He hasn’t been on the disabled list since a 16-day stint with a sore shoulder in 2009. He is a workhouse.

But something went wrong — or got worse — Tuesday between his 10-pitch, a 1-2-3 first inning, and that warm-up pitch. And, according to the club, he decided it was best to remove himself from the game.

More on the Nationals:

Monday: Gonzalez loses no-hit bid in ninth inning

Dave Jageler almost calls a no-hitter in his first Nats TV broadcast in years

Brandon Kintzler was feeding a rhino when he learned he’d been traded

Dusty Baker avoids deja vu in Miami with ninth-inning hook

Zack Morris’s phone gets an upgrade in Nats’ ‘Saved by the Bell’ promo