MIAMI — If not for Brian Dozier, if not for the six-run rally he sparked, if not for the last-ditch damage control from an otherwise leaky bullpen, it could have been a very bad Saturday night for the Washington ­Nationals.

But instead, in a twist, the Nationals won despite themselves. The final score, 10-4 over the Miami Marlins, could have hidden the missteps that got Washington there. Fernando Rodney gave up a four-run lead in the eighth inning. Manager Dave Martinez left him in to do so. Stephen Strasburg had pitched seven scoreless innings, a gem, but the Nationals nearly wasted it against a last-place club.

Then Dozier, in just his second at-bat in six days, poked a go-ahead RBI single in the 10th inning at Marlins Park. The floodgates opened, and the Nationals widened the gap until the Marlins had no hope to grip. Adam Eaton added a run with a two-out single to left. Juan Soto added another by working a base-loaded walk. Kurt Suzuki smacked a three-run double, erasing any doubt, and that’s how the Nationals found additional comfort atop the wild-card standings.

The victory, combined with another Chicago Cubs loss, gives them a four-game cushion ­between making and missing the postseason. The Milwaukee Brewers remain just a game behind Washington for the top spot. But the Cubs have lost five straight and are fading fast. The Nationals, now 15-3 against the Marlins, are 85-68 and have nine games left to play.

“It’s just about picking each other up; it’s a team game,” Suzuki said of the bats covering up another eighth-inning meltdown. “You know, [the relievers] pick us up a lot. We pick them up a lot. It makes for some good chemistry.”

To create that separation and nearly boil the wild-card race down to two teams, Washington had turned to the perfect pitcher in a big spot. In his four previous starts against the Marlins this season, Strasburg had a 4-0 record, 1.19 ERA and 43 strikeouts in 30⅓ innings. The calculus of this is pretty simple: Miami is one of baseball’s worst teams, and Strasburg is one of baseball’s best pitchers. So when put against each other, Strasburg is bound to thrive way more often than not.

But so much success against one club — and for it to stretch for so long — is still a bit of an anomaly. Strasburg first used his bat to keep it going Saturday, hitting an RBI single with two outs in the second inning. Then he went seven innings for the 13th time this season.

“I kind of lost my command a little bit,” Strasburg said of having to strand the bases loaded in his final inning. “You just try to take it one pitch at a time and go as long as you can.”

The Nationals pieced together a rally in the fourth, and Yan Gomes punched his second hit to force third base coach Bob Henley into a decision. Henley, criticized for a questionable send earlier this week — and criticized often over the years — decided to wave Asdrúbal Cabrera home. The alternative was bringing up Strasburg with one out and the bases loaded. The result was Cabrera, far from fast, getting thrown out by at least five feet. Cabrera, who had two hits and a walk, tweaked his ankle on the play and later left the game, subbed out for Dozier.

That helped Marlins starter Jordan Yamamoto navigate out of the jam. The offense later stretched the lead to 4-0 in the eighth inning. Strasburg, by that point, had completed his outing at 109 pitches. But that’s when Rodney entered and the game unraveled on the Nationals.

The 42-year-old right-hander didn’t have it from the start of the eighth. He gave up a leadoff double to Miguel Rojas and an RBI double to Starlin Castro two batters later and soon loaded the bases by yielding a walk and single. He only had one out. Martinez had both Tanner Rainey and Hunter Strickland warming in the bullpen. But the manager stuck with Rodney, even with his pitch count up to 23, and Austin Dean crushed a three-run double that knotted the score.

Rodney exited after giving up four hits, three of them doubles, in his second appearance in as many days. Then and only then did Martinez step out of the dugout and begin his walk to the mound. It was a batter too late. It was maybe a few batters too late.

“We had guys up, but I know Fernando, and he typically can get out of a jam,” Martinez said of not hooking Rodney before the Dean at-bat. “He’s going to throw strikes. He was the guy for me right there.”

Strickland came in to steady the Nationals, stranding the go-ahead run on second, before the Nationals couldn’t score off José Ureña in the ninth. Wander Suero then blanked the Marlins in a one-two-three bottom half.

That led to extra innings, to a spot the Nationals didn’t expect to be in, and that’s when the final push began. Dozier, the club’s everyday second baseman to start the season, has lost his spot to Cabrera in recent weeks. But he still started a rally that kept Rodney and Martinez from shouldering loads of blame. The path to the win was certainly not smooth. But it doesn’t have to be at this time of year.

Read more about baseball :