Trea Turner acknowledges the crowd after his sixth-inning grand slam gave the Nationals the lead after they trailed, 9-0. The Nationals went to win, 14-12. (John McDonnell/The Washington Post)

Trea Turner hopped and skipped, flashing an ear-to-ear smile, doling out high-fives to the jubilant teammates waiting for him behind home plate. Water splashed as he waded through a sea of glee in the Washington Nationals’ dugout. He had just hit a grand slam in the sixth inning on July 5 against a last-place team. It felt like so much more.

Sensing the moment, Turner emerged for a curtain call. “Let’s go!” he yelled to the Nationals Park crowd. The Nationals were alive. They were alive because Turner’s first career grand slam completed a comeback they so desperately needed, erasing a nine-run deficit with 10 runs over three innings en route to a 14-12 victory over the Miami Marlins.

Washington became the first team in the majors to win a game after trailing by nine runs since 2016 and the first in franchise history to overcome a deficit that large. Turner finished with eight RBI — the second-highest single-game total in Nationals history and tied for the most by a leadoff hitter in major league history. His grand slam was his second home run of the night and the Nationals’ first with runners on base since Friday.

“It’s something that I play through my head, but to actually do it is pretty good,” Turner said. “Pretty special.”

The Nationals (43-43) completed the spectacle a day after toiling so badly that a closed-door, players-only meeting was deemed necessary. It was intended to galvanize a free-falling club on a five-game losing streak that had fully realized its margin for error had become uncomfortably thin. For four innings, the session appeared to have made zero impact, and fans were fed up.

The first boos arrived in the second inning as Martin Prado trotted around the bases after his three-run home run. Another round arrived a couple of innings later as Justin Bour jogged around after blasting a two-run homer. The boo birds have seen two 162-game movies like this before, full-featured disappointments in 2013 and 2015, and they didn’t like the endings. The Nationals were losing 9-0, in danger of falling two games below .500 before it was even an official game, and it was time to vent.

Jeremy Hellickson stood on the mound as those boos rained. He had arrived at the ballpark sick enough for the Nationals to have a contingency plan in case his illness prevented him from pitching deep into the game — if he started at all. Jefry Rodriguez, called up from Class AAA Syracuse before the game, was in the bullpen ready to go whenever needed. He hadn’t pitched since Saturday and was slated to start for Syracuse on Thursday. He was available.

But the ailing Hellickson took the mound to do his job. He immediately labored. Before he strained his hamstring in early June, Hellickson pitched to a 2.28 ERA in eight starts by consistently saturating the strike zone. He isn’t a hard thrower. He survives with pinpoint command. He didn’t have that command in the first inning and fell victim to Anthony Rendon’s two-out error at third base, which allowed the Marlins to jump ahead. Suddenly, the Nationals were reeling again.

It got worse an inning later, with Hellickson again one out from emerging unscathed. Derek Dietrich singled and Brian Anderson was hit by a pitch to load the bases for J.T. Realmuto, statistically baseball’s best offensive catcher. He promptly stroked a two-run single to center field. Bour then walloped another single before Prado provided the gut punch, a line drive off the left field foul pole that completed a six-run, two-out deluge. The barrage happened swiftly, in 12 pitches, and it gave the Marlins (36-53) a seven-run edge.

Nationals Manager Dave Martinez could have gone to Rodriguez at that point. Hellickson clearly wasn’t at his best. But Martinez chose to keep him in the game. He was rewarded with a scoreless third inning before watching his gamble fizzle in the fourth once Bour clobbered a two-run homer. Hellickson finished the inning trailing 9-0 but confident a surge was imminent.

“It kind of had a weird vibe,” reliever Shawn Kelley said. “Even though we got down, I think everybody, in a weird way, had a feeling that we were going to make this a game.”

The Nationals began chipping away in the fourth with Turner’s leadoff home run off Marlins right-hander Pablo Lopez. A four-run flood, capped off by Juan Soto’s two-out, two-run double, followed in the fifth. An emotional Soto turned around to face the Nationals’ dugout when he reached second base. “Let’s go!” he screamed a couple times. The Nationals had a pulse.

They did not let up. Bryce Harper worked a leadoff walk in the sixth inning before Matt Adams doubled as part of his 4-for-5 night in his return from a fractured finger. After Daniel Murphy’s sacrifice fly scored Harper, Michael A. Taylor walked. Then Martinez made an aggressive decision: Down 9-6 with four innings to go, he elected to pinch-hit Mark Reynolds for Pedro Severino. The strategy proved effective — Reynolds walked to load the bases.

“When Trea hit the home run [to make it 9-1], it felt like we took the lead,” Martinez said. “They were jacked up, so it was good to see. The moves in the sixth inning were for that reason. We got a chance to score a bunch of runs here, so let’s just do it. And they did.”

Pinch hitter Wilmer Difo struck out, but Turner salvaged the rally by whacking a 97-mph fastball from Adam Conley into the visitors’ bullpen beyond the left field wall after previously going 0 for 7 against the left-hander. The ballpark erupted. Max Scherzer slapped the dugout rail. Murphy climbed on it and roared.

But the Nationals weren’t finished, and they ultimately couldn’t afford to be. Washington tacked on four more runs in the seventh on singles from Spencer Kieboom, Turner and Soto. The additional cushion absorbed Anderson’s three-run home run in the eighth on Kelvin Herrera’s second pitch. Without it, Turner’s grand slam would have been for naught. It wasn’t, and the Nationals, roused for at least one night, climbed back to .500 on a night when they were left for dead.

“Hopefully,” Kelley said, “that’s something we look back on in a month or two from now, or four, five months from now, and be like, ‘Man, that changed the course of the season.’ ”