Matt Wieters rounds the bases after hitting an eighth-inning grand slam Sunday that broke a tie and sent the Nationals on their way to a 9-4 win. (Jonathan Daniel/Getty Images)

Ryan Zimmerman said it best in front of a popular refrigerator packed with water bottles in the cramped visitors’ clubhouse at Wrigley Field on Sunday afternoon. Minutes earlier, his Washington Nationals had stormed back from a three-run deficit to snatch a 9-4 win from the Chicago Cubs, the club they will confront the first weekend in October should the National League standings hold. It was an uplifting victory — buoyed by Matt Wieters’s tiebreaking grand slam off reliever Carl Edwards Jr. in the eighth inning — over the defending World Series champions. It was, however, a victory in August, not October.

“Winning two out of three right now does nothing for us in October,” Zimmerman pointed out. “And, who knows, both of us could have different teams by then. You just never know what’s going to happen.”

But Sunday’s — and the weekend’s — result did not mean nothing. With the win, the Nationals (65-44) claimed the three-game weekend set along with the seven-game season series, which would factor into the equation for home-field advantage between the clubs in a National League Division Series matchup if the Nationals’ 7½ -game cushion on the Cubs (58-52) evaporates. On top of that, Washington did it without one of its top three starters throwing a pitch all weekend and fielding depleted lineups missing its top-of-the-order pieces.

It was possible because Erick Fedde — the Nationals’ top pitching prospect — kept them within a run Sunday, their revamped bullpen held the Cubs scoreless for the second time in three days, and their offense — still potent despite its diminished state — showed off its depth in the eighth inning as an opponent’s bullpen imploded for once.

Brian Goodwin and Bryce Harper celebrate Goodwin’s solo home run in the ninth inning. (Jonathan Daniel/Getty Images)

“You always try to win that seventh, eighth and ninth,” Nationals Manager Dusty Baker said. “Doesn’t always happen, and we did it against a pretty good bullpen.”

Edwards found himself in an unenviable spot in that eighth inning. The Cubs right-hander had been summoned from the bullpen to prevent the Nationals’ prolific middle-of-the-order foursome from erasing a one-run Cubs lead. Bryce Harper had just beaten out an infield single with one out. Zimmerman, the second of the four dangerous hitters, was stepping in. Six pitches later, the Nationals had an 8-4 lead.

The avalanche began when Zimmerman cracked a double to center field. With first base open, Edwards was instructed to intentionally walk Daniel Murphy without a pitch to bring up Anthony Rendon with the bases loaded. Edwards then grazed Rendon, the final member of the fearsome quartet, with a first-pitch curveball on the left arm, which scored Harper to tie the game.

That brought up Wieters. The Nationals’ switch-hitting catcher had two hits from the left side in Saturday’s loss before he was ejected, but he represented a steep plunge in threat level. Entering Sunday, Wieters had the seventh-lowest on-base-plus-slugging percentage against right-handed pitching in the NL among players with at least 250 plate appearances opposite righties. He hadn’t hit a home run from either side in 22 games since June 28, when he also homered against the Cubs, and has been a vastly better hitter out of the No. 8 spot, where he has posted a 1.050 OPS in 25 games, than anywhere else. He batted seventh Sunday.

All that was thrown out when he recognized a first-pitch curveball the instant Edwards spun it. It hung out over the plate and Wieters belted it 409 feet, over the ivy-shielded brick wall in center field, to catapult Washington on top.

“Lately, I’ve been kind of made some progression with the left-handed swing,” said Wieters, who also hit a sacrifice fly in the seventh. “And it’s funny, [Saturday] was probably the best I’ve felt left-handed, and of course we get a left-handed starter today. But it’s kind of what you do with switch hitting; one side feels good and you keep working at the bad side until it feels good. And right now, we might have made that switch to where the left-handed side feels better.”

Another win in the books for Sean Doolittle (62) and Wieters as the Nationals wrap up the series at Wrigley Field. (Jonathan Daniel/Getty Images)

Wieters’s job Sunday also included directing Fedde in a setting organizations prefer to avoid for a rookie in his second career start. But the right-hander, whose debut a week earlier against the Colorado Rockies was shaky, didn’t appear overwhelmed over his 5⅓ innings. His stuff played and, at times, he overpowered a lineup that has been one of baseball’s most explosive since the all-star break but had never seen him.

Mistakes resulted in three solo home runs — two by the red-hot Willson Contreras — and a high pitch count (99 pitches to get 16 outs) forced him from the game earlier than preferred. But the Nationals were within a run, trailing 4-3, when he exited in the sixth inning, which was well within striking distance for an offense that remains potent despite not having all of its parts.

“The first game, I felt like I really got away from my breaking ball and just turned into a two-pitch pitcher,” said Fedde, who struck out seven and walked four. “Today, I got to all four of my pitches and stayed with them throughout the game and kept guys off-balance.”

Baker replaced Fedde with Oliver Perez with one out in the sixth inning and Cubs starting pitcher Jon Lester, who allowed three runs over 6⅔ innings, due up. The left-hander escaped unscathed after Wieters threw behind Jason Heyward at second base to catch him hanging too far off, which led to a rundown and the inning’s second out. Perez then struck out Lester to end the frame.

From there, the Nationals’ new three-headed relief unit of Brandon Kintzler, Ryan Madson and Sean Doolittle took turns throwing a zero on the board to finish off a win that does nothing in October but meant something in August.

“That was a good game to win for us,” Baker said. “To win the series and to win the yearly series. Who knows? That maybe could come up big.”