ATLANTA >> A final day that wasn’t on the schedule and won’t soon be forgotten.

An improbable comeback by the New York Mets in the opening game of a makeup doubleheader to secure their playoff berth. A gritty recovery by the Atlanta Braves in the nightcap, stamping their postseason ticket, as well.

And all the Arizona Diamondbacks could do was watch hopelessly from the desert, their hopes snuffed out by two games on the other side of the country.

“You’re just focused on getting into the postseason,” said Braves first baseman Matt Olson, soaked in champagne as he celebrated a 3-0 win in the last game of the regular season. “Whatever it took. If we had to play four games today, we would have done it.”

The regular season went to extra innings after the Mets and Braves had a pair of games rained out last week by Hurricane Helene. They controlled their own fates, with each holding a tiebreaker edge over the defending NL champion Diamondbacks.

Arizona needed one team to sweep, so they were pulling for the Mets after they overcame deficits of 3-0 in the eighth inning and 7-6 in the ninth to win the opener, going ahead for good on Francisco Lindor’s two-run homer.

“That was one of the craziest games I’ve ever been a part of,” said Carlos Mendoza, the Mets rookie manager. “Just the meaning of it. Coming back in the game and then losing the lead and then coming back again in the ninth. It was unbelievable.”

The Braves, to their credit, bounced back to get the win they had to have. Even after ace Chris Sale was scratched because of back spasms, journeyman Grant Holmes stepped in to lead off a three-hitter spread among six pitchers.

At the end, in the perfect capper to a wacky day, there were champagne-spraying celebrations in both clubhouses at Truist Park.

Holmes found out he was starting about a half-hour before the first pitch.

“I was about to go get some food,” he said. “They came up to me and said, ‘Hey, you’re going to start this one off today.’ And I was like, ‘Oh, OK, here we go.’”

With their postseason berth locked up, the Mets added left-hander Joey Lucchesi to the roster to start the second game. The 31-year-old left-hander spent most of the season at Triple-A Syracuse, giving up five runs in 4 1/3 innings in his lone big league appearance before Monday,

He was a totally different pitcher against the Braves, who might’ve still been a bit shellshocked after the way they lost the opener. Lucchesi (0-2) allowed just three hits, including a run-scoring single to Gio Urshela, in a six-inning, 111-pitch outing.

But Marcell Ozuna gave the Braves some breathing room with a two-run single in the seventh. Daysbel Hernandez (3-0) earned the win and Raisel Iglesias finished it off for his 34th save in 37 chances.

The Braves also got a scoreless inning from starter Reynaldo López, who had pitched six innings just two days earlier.

“I’m so proud of all those guys,” Atlanta manager Brian Snitker said. “It takes the whole building to make something like this happen.”

The Mets were already in celebration mode after Lindor’s 33rd homer.

Trailing 3-0 after managing just three singles through seven innings against rookie Spencer Schwellenbach, New York’s offense came to life in the eighth.

The Mets surged ahead with a six-run outburst, capped by Brandon Nimmo’s two-run homer. The Braves stormed back with four runs in the bottom half, as Ozzie Albies delivered a bases-loaded double with two outs for a 7-6 lead.

But New York delivered the final blow with Lindor’s drive into the Braves bullpen off Pierce Johnson (7-5).

“I got the pitch that I wanted and you never know if the ball is going to go out or not,” Lindor said. “But I feel like I got it 100% and all I kept saying was, ‘Thank you, Jesus.’ We’re one step closer, we got to finish it. Finish, finish, finish, finish.”

Atlanta had been holding back Sale since his scheduled start last week was rained out, saying they wanted to use him in an elimination game.

But the left-hander wasn’t able to pitch because of back spasms, which Braves general manager Alex Anthopoulos said only cropped up after a throwing session Sunday but Snitker conceded had been an issue for some time.

Snitker said the Braves will be without their top starting pitcher when they face the Padres in a best-of-three wild card series.