The last week of the Washington Nationals’ season, which promised drama, tension and even a dash of fear, has suddenly turned, in the span of 28 jubilant hours, into a ton of fun, celebration, champagne and October hope.

With three wins over the Philadelphia Phillies in slightly more than a day, including a day-night doubleheader sweep Tuesday by scores of 4-1 and 6-5, the Nats have, in a blink, both clinched a wild-card spot and taken a one-game lead over Milwaukee for home-field advantage in what looks increasingly like next Tuesday’s wild-card matchup.

The Nats’ chances of winning a wild-card spot during this homestand were already 98 percent, thanks to the Chicago Cubs’ collapse over the past week. But few expected all the tumblers to fall in place so quickly — and a lead over the Brewers, too, as the Nats knocked off the Phils, 7-2, on Monday, then swept them Tuesday as the Cubs were losing their seventh straight against the miserable Pirates in Pittsburgh.

A celebration that was a kind of foregone conclusion suddenly became a Nats Park flash mob event as the team’s magic number fell from three at the beginning of the long day to two then one and finally none after Trea Turner’s grand slam in the nightcap erased a 4-2 deficit and ultimately made a winner of Max Scherzer, who fanned 10.

Few teams have deserved to celebrate a wild-card clinch more than these Nats, who began their season 19-31 but, since then, have gone a scalding 69-38 for exactly four months — from May 24 to Sept. 24. That winning binge has lumped them with the Los Angeles Dodgers and Atlanta Braves as the three hottest teams in the NL over that span.

As soon as the Nats clear their bleary celebrating heads, they’ll only have eyes for the Brewers. Milwaukee holds the tiebreaker for home field since they won the season series with the Nats, taking four of the six meetings between the teams.

“Pretty incredible. We always believed. Now other people see it as well,” said Turner, whose day included a single and two doubles in the opener before he doubled and delivered the decisive blast in the nightcap. His return from 39 games on the injured list with a broken index finger, followed by four months of stellar play coincides with the Nats’ revival.

On this team full of dugout-dancing home run celebrants, who would be the wildest Nat in a wild-card clinch party? “Don’t know,” said Turner, speaking before his clinch heroics. “We got a ridiculous clubhouse tight now.”

After their clinch, every Nats seemed to be in an all-roster dead-heat tie for craziest and happiest.

In the clubhouse, Nats in goggles, drenched in champagne, formed a circular conga line and sprayed happiness. Looking on were delighted members of the Lerner family. “That sure happened fast,” said Debra Lerner Cohen. “We’ll take it!” said her husband Ed.

The Nats now have five games and six days to figure out how they should approach the team’s first wild-card appearance. Give regulars, especially those who have played every day (Anthony Rendon, Juan Soto and Turner) some rest, a day or two off? Or try to keep pushing to hold that home-field lead on Milwaukee.

“We’ll have to balance it,” Manager Dave Martinez said. “They’ve fought all year.”

The biggest remaining decision — and a tough one — will be whether to start Scherzer, who has fanned 21 in his past two starts but has a homer-prone 5.16 ERA in September, or Cy Young Award candidate Stephen Strasburg (17-6 with a 3.37 ERA) in the wild card game. Scherzer allowed two homers to Phillies sub Brad Miller on Tuesday, a shocking sight that may make Martinez rethink his statement early on Tuesday that Scherzer was his choice for Oct. 1.

Managers, and those above them, can change minds. Max would have extra rest while Strasburg would be on turn. Debate, loudly, among yourselves. I’m leaning Strasburg.

Entering Tuesday’s nightcap, the Nats had a 68-38 record from May 24 to Sept. 24 — the same record in that span as the Dodgers and Braves. Run differential in that period: Dodgers plus-187, the Nats plus-167 (by far the two best in the NL) and the Braves plus-97. The Dodgers and Braves are clearly the class of the NL; the Braves reasserted their status by beating the Nats in five of seven games this month.

But the Nats, with Scherzer returning to form and Sean Doolittle looking crisp in a scoreless inning Tuesday, are as dangerous an opponent as any team might wish to avoid in a wild-card game or division series.

While champagne is all well and good, the Nats have unfinished business the rest of this week. Not deadly serious, but rather important.

Everybody wants a winner-take-all game to be at home — whether the stats say it matters or not. Fans want to see the game in their own park. Players prefer sleeping in their own beds, avoiding extra airplane flights for Game No. 163. And it’s also nice, with the season in the balance, to know every bounce off the wall.

“I don’t really care [where the wild-card game is]. We’ve lost three Game 5s here,” said Turner, who played in the 2016 and ’17 losses. “You have to beat somebody good to advance. . . . It’s going to come down to execution, not the ballpark.”

Turner may be right. Since the playoffs expanded to include a one-game wild card in 2012, the road team has an 8-6 record. Five times those wild cards have ended up with identical records and needed a tiebreaker to decide home field. Little good that tiebreaker did them. Only one of five teams got home field that way and won.

What truly and absolutely helps in a wild-card game? An ace who pitches like a Hall of Famer when it matters most. Madison Bumgarner started such games for the Giants, both times on the road, in 2014 and 2016. Both times he had four-hit shutouts. Once, the score was still 0-0 entering the ninth. MadBum simply refused to let the Giants lose. In 2014, they won the World Series.

Can Scherzer do something similar? His regular season credentials are even better than Bumgarner’s, and his future spot in the Hall of Fame is every bit as likely, but Scherzer’s October work has been mediocre (4-5, 3.73), including a loss in relief in Game 5 in 2017. So far, Mad Max and MadBum are not to be confused in October. It’s Strasburg who’s had a recent dominant playoff and, in his past seven starts, has a 1.80 ERA, .160 average against, 0.88 WHIP and tons of Ks.

The Nats and Brewers, on a 16-2 streak despite losing superstar Christian Yelich for the season, may be in better position than their fans understand. One of them is virtually certain to go to the NLDS. Whichever does will probably scare the superior Dodgers half to death. The better baseball team, even a 100-win-or-more team like L.A., has almost no advantage in a five-game series.

It’s win your bar bet time, again. In the past 20 years, what is the record of the team with the better regular season mark in a five-game division series?

Answer: 39-39-2. (Twice the teams had the same season record.)

The Nats illustrated this brutal reality of the division series by having the better record, and home-field advantage, four times in the NLDS. They’re 0-4.

Well, what about teams with 100-plus wins — the all-around wonderful, virtually flawless teams such as the current Dodgers (100-56). What’s their division series record?

Answer: 12-12.

That’s why Scherzer and Doolittle are so important to the Nats’ chances. For weeks, every teammate has wondered whether they could recover from injuries — Scherzer to his back, Doolittle to his knee, plus perhaps an exhausted arm. Tuesday provided some hints.

“I’ve made some changes and been feeling good. . . . Really wanted to see how it was going to play,” Doolittle said. “I was happy with it. . . . I’m starting to get that [arm] extension back [for high fastball spin rates]. We’re starting to miss barrels again . . . get pop-ups . . . use the slider effectively. . . . I’m not proclaiming to be back by any means, but we’re definitely moving in the right direction.”

Well, Sean, “we” have about seven more days to reach “back” or close to it.

“Baseball is the hardest sport to reach the playoffs,” said Doolittle, meaning the major leagues allow only 10 in the field, fewer than the NFL’s 12 or the 16 in the NBA and NHL. “But all you need is a ticket to the dance. Once you’re in, anything can happen.”

The Nats now have their ticket, clutched in their deserving hands. They punched it the hard way — all by themselves when few thought they could. As for dancing, they’ve been doing that all along.