Max Scherzer walks off the mound before the start of the bottom of the second inning Tuesday night in Miami. Scherzer left with neck spasms. (Mike Ehrmann/Getty Images)

Max Scherzer crushed his first career home run in the second inning at Marlins Park on Tuesday night, a three-run blast way beyond the bright green left field wall, to lengthen his extensive list of professional accomplishments. He was ecstatic as he rounded the bases. His teammates honored the occasion by ignoring him in the dugout, a baseball tradition, before mobbing him with high-fives. The Washington Nationals’ glee, however, was fleeting.

A few minutes later, Scherzer took the mound for the bottom of the second inning of the Nationals’ 7-6 loss to the Miami Marlins. He threw a warmup pitch that sailed past catcher Matt Wieters. He then motioned throat slashes to the Nationals’ dugout, prompting instant angst, the club’s championship aspirations suddenly flickering.

“I’m done,” the ace informed a startled Manager Dusty Baker. “I can’t go.”

Scherzer walked off before Baker even made it onto the field and left-hander Matt Grace jogged in from the visitors’ bullpen. Just like that, Scherzer was done for night, and external speculation whirled. Almost a half-hour later, the Nationals broke from their usual policy of withholding in-game injury updates to provide one for the best right-handed pitcher in baseball. A spokesperson said Scherzer had a neck spasm after he “slept on it funny.” He took himself out as “a precaution.”

Scherzer confirmed the diagnosis after the game, maintaining he doesn’t consider the ailment serious. The Nationals had known about it. Trainers worked with him to alleviate the stiffness enough for him over the previous two days to pitch Tuesday, but it worsened in the second inning to the point that it hurt for Scherzer to look to his left.

“It’s just day by day with this thing,” Scherzer said. “This isn’t an injury where I crashed or did something stupid. . . . I slept on it wrong. Sometimes you wake up in the morning and you have a crick in your neck. That’s what it is. I’ve had this in the past.”

The diagnosis was the most relief the Nationals (63-42) got all night. Handed a six-run cushion, the bullpen was unable to secure 24 outs without squandering it. The Marlins (50-55) capitalized on Scherzer’s premature exit to score seven unanswered runs off Grace, Sammy Solis and Matt Albers over the next four innings. The outburst was capped off by a four-run fifth inning, which included Marcell Ozuna belting a three-run home run off Albers (5-2).

“We couldn’t hold them,” Baker said. “They kind of slow-walked on us, and then their bullpen shut us down.”

Scherzer’s assignment when he stepped to the plate in the second inning was to humbly sacrifice himself to move the runner at first base to second. But Scherzer missed the first pitch. Then he fouled off the second to dig himself an 0-2 hole.

He moved his right hand up past his bat’s handle, where the lumber starts to get thicker to the barrel, as if he were going to bunt before the next pitch anyway. But he pulled the bat back as Chris O’Grady released a cutter that Scherzer yanked for the three-run home run, which extended Washington’s lead to 4-0. He ran to first base with his mouth agape, as if he wasn’t sure that he had really hit his first home run since high school. He theorized his stiff neck helped because it forced him to keep his head in on his swing.

“They’re not going to hear the end of it,” Scherzer said of his teammates. “I’ll probably have shirts made and everything.”

Two batters later, Howie Kendrick smashed a two-run homer to make it 6-0. The Nationals, however, were held to four hits for the rest of the night. Kendrick, who finished 5 for 5, had three of them. Besides that, the rest of Washington’s lineup went 1 for 22 with three walks after Kendrick’s homer.

Ultimately, the result is insignificant if still disturbing because incumbent members of the Nationals’ overhauled bullpen floundered once again and the starting rotation is experiencing some tumult — at least temporarily. Stephen Strasburg’s status remains unclear. Gio Gonzalez is expected to go on paternity leave at some point in the next few days. Joe Ross was already lost for the season, and A.J. Cole will be summoned to make a spot start in Wednesday’s series finale.

It’s significant because the Nationals left Marlins Park still with a 13-game lead on Miami in the National League East. There is no playoff race to worry about. They are playing for October, and Scherzer’s status holds more import than anything else that happened at Marlins Park on Tuesday night.

The fact that Scherzer removed himself was harrowing because it was so far out of character. The 33-year-old right-hander has bucked the odds to become perhaps the most durable pitcher in baseball, and he takes tremendous pride in being an innings-guzzling workhouse. He’s made at least 30 starts every year since 2009 and hasn’t been on the disabled list since a 16-day stint with a sore shoulder at the beginning of that 2009 campaign.

Otherwise, he’s missed starts here and there with minor aches over the years, but nothing worth significant time. Last year, he pitched the final month-plus of the season with a stress fracture in the knuckle of his right ring finger. He ended up winning the NL Cy Young Award anyway. The injury then delayed his start of spring training, forcing him to throw fastballs with three fingers when he got going. Scherzer didn’t miss a turn in the rotation once the regular season started.

But he decided that pitching through the neck discomfort Tuesday was unwise. There were outward signs before that warmup pitch went wild. His fastball velocity was down some, and cameras caught him grimacing in the dugout after the home run. It hurt to high-five his teammates. He was, the world found out a few minutes later, in pain even as his smashed his first home run. And his night was soon over.

“You just have to take your pills, take your drugs, take your anti-inflammatories, get some rest, and just get treatment,” Scherzer said. “This will come and go.”