It was a two-week odyssey for the New York Mets that would’ve put even Homer on pins and needles at the edge of his seat.

Big Apple to Atlanta. Consecutive rainouts caused by Hurricane Helene. Fly north to Milwaukee for the weekend.

Back down to Atlanta for one day and a makeup doubleheader. Back up to Milwaukee for the Wild Card Series. East to Philadelphia for two more playoff games.

And now — finally — back home at Citi Field for a pivotal Game 3 against the rival Phillies on Tuesday in a best-of-five NL Division Series that’s tied 1-all.

“Feels like we’ve been on the road forever,” Mets manager Carlos Mendoza said.

Along the way: Five crucial wins, three thrilling comebacks, two champagne celebrations — and 3,566 miles round trip.

“Incredible. I think you could write a book. You could make a movie,” Mendoza said Monday as both teams held workouts at Citi Field.

When the Mets left town Sept. 22 following a Sunday night victory over Philadelphia, their stated goal was to wrap up a National League wild card and last long enough in the postseason to play in Queens again this year.

No easy task, they certainly knew. And with all the emotional highs they’ve enjoyed lately, it’s easy to forget the Mets are just 5-6 overall since their last home game.

But here they are.

“We’ve had to go through a lot of things just to get here,” said left-hander Sean Manaea, scheduled to start Game 3 against Aaron Nola, with slumping Alec Bohm back in Philadelphia’s lineup.

“We just keep believing, and we’re here. All we have to do is get our foot in the door and let’s see what happens. We’re at that point. It’s been a crazy ride.”

Manaea’s voice was scratchy — he said probably the result of his reaction to Pete Alonso’s go-ahead homer in the ninth inning Thursday night at Milwaukee that saved New York’s season in the Wild Card Series clincher.

The Mets rallied late again to win their NLDS opener Saturday, only to see NL East champion Philadelphia turn the tables with a dramatic comeback in Game 2.

“We’ve been on the good side and now on the bad side. Incredible week. But that’s what makes baseball such a beautiful sport,” Mendoza said. “Hopefully we continue to write our own story.”

Roberts upset Machado seemed to throw at him

Los Angeles manager Dave Roberts said it was “bothersome” and “unsettling” that a ball San Diego third baseman Manny Machado threw into the Dodgers dugout seemed intended for him during the Padres’ 10-2 win in Game 2 of their NL Division Series, when tempers flared on the field and in the stands at Dodger Stadium.

It was one of several incidents Sunday night that prompted Dodgers starter Jack Flaherty and Machado to exchange profanities as the Padres evened the series with Shohei Ohtani and the Dodgers at 1-1 by hitting six home runs. Two of them were by Fernando Tatis Jr., who was hit by a pitch by Flaherty, which also angered Machado. Flaherty also hollered at Machado after striking him in the sixth.

“It was unsettling,” Roberts said. “And the ball was directed at me with something behind it.”

The game was also delayed for 12 minutes after rowdy fans tossed baseballs in the direction of San Diego outfielder Jurickson Profar, and then trash onto the outfield.