NEW YORK — It figured, didn’t it?

An improbable season, one in which the Dodgers achieved the best record in baseball even as their injured list expanded, ended in an improbable way Wednesday night in the Big Apple.

Consider this: Before now, according to the people who look these things up for Fox Sports, no team had come back from a five-run deficit to win a World Series clincher. And by the end of the second inning of Game 5, the Dodgers were staring at a 5-0 deficit, and Yoshinobu Yamamoto was probably already gearing himself up mentally to pitch a Game 6 Friday night at Dodger Stadium.

Stand down, Yoshinobu. Your next obligation will be Friday, all right, but it’s going to be a parade through the streets of L.A.

Yes, the Dodgers are World Series champions. And maybe you can describe them as champions of the world, a team with representatives from Japan, Cuba, Puerto Rico, Venezuela and the Dominican Republic — and, if you want to take World Baseball Classic affiliation into account, Canada, even though Freddie Freeman was born and grew up in Orange County.

They got here even while using 40 pitchers over the course of the season, while having two full starting rotations worth of hurlers on the injured list, and having Max Muncy and Mookie Betts out for significant periods during the season, Freddie Freeman hobbled by an ankle injury for the first two postseason series and Shohei Ohtani nursing a partially dislocated shoulder in the final three games of this one.

It was improbable to the end. They had three starting pitchers left in the postseason, and one of those three, Walker Buehler, channeled his inner Orel Hershiser and closed out the ninth inning, with the Dodgers having used all of their leverage relievers, to preserve the 7-6 victory that finished this World Series in five games.

What was it that the late Vin Scully said, after a home run out of nowhere in 1988 started the Dodgers toward what was their last full-season championship before this? “In a year that was so improbable, the impossible has happened.”

And can we suggest that maybe there is an unseen hand that guides these things? In ’88, Game 1 was decided by Kirk Gibson’s walk-off home run, and the Dodgers beat the mighty Oakland A’s in five games. In ’24, Game 1 was decided by Freeman’s 10th-inning walk-off grand slam, and the Dodgers beat the Yankees in five games.

One similarity between the two: In ’88, the Dodgers were running out of position players because of injuries. In ’24, a pitching staff seemingly held together by chewing gum and baling wire made it to the end. It wasn’t always pretty, and there were times in the postseason — including Tuesday night’s Game 4 — that manager Dave Roberts had to marshal his resources, opting to sacrifice the present in pursuit of the main goal.

It worked.

But while it may have been improbable in so many ways, these Dodgers really are baseball’s best team. They finished the regular season with the game’s best record, they fought off elimination in the first round against San Diego — which, as it turns out, was the toughest team they faced in the postseason and very easily could stake a claim as the second-best team in baseball (but, sorry, no parade) — and then swept through New York, eliminating the Mets in six and the Yankees in five.

“There’s a number of fingerprints all over this win,” president of baseball operations Andrew Friedman said during the postgame on-field ceremony. “Scouting department, player development ... there’s a number of people. It’s a special group.”

Game 5 displayed some of the reasons these Dodgers are the best team in the game. They’re relentless offensively. And they took full advantage every time the Yankees opened the door.

Down 5-0, they took advantage of New York mistakes to send 10 men to the plate and tie the score in the fifth. Aaron Judge let Tommy Edman’s drive clank off his glove in center field, shortstop Anthony Volpe made a throwing error on an attempt to get the lead runner at third, loading the bases.

Pitcher Gerrit Cole, who had held the Dodgers hitless for four innings, started to cover first and then inexplicably stopped on Mookie Betts’ grounder to the right side, scoring the first run of the inning and opening the door for Freeman’s two-run single and Teoscar Hernández’s two-run double to tie the score.

After the Yankees had gone back in front on Giancarlo Stanton’s scoring fly ball in the sixth, the Dodgers responded with two in the eighth. Gavin Lux flied to center to score Max Muncy, and the rally was further aided when Shohei Ohtani — who hadn’t had a really good at-bat since he hurt his shoulder in Game 2 — was awarded first on catcher’s interference. Betts’ scoring fly ball plated Edman, and the Dodgers were in front to stay.

Even with Judge breaking out of his postseason funk with a titanic two-run homer in the first, and Jazz Chisholm and Giancarlo Stanton also homering, the Yankees had too many flaws. And the Dodgers took full advantage.

It came down to relief pitching. Blake Treinen, the last leverage pitcher the Dodgers had available, pitched 2 1/3 innings and threw 42 pitches. Buehler, who pitched and won two nights earlier as a starter and was ticketed to pitch a possible Game 7, came out of the bullpen to make sure there wouldn’t be one, getting the Yankees in order and finishing it with a strikeout of former teammate Alex Verdugo.

No, there won’t be a Game 7, or even a Game 6. But there will be a parade, likely Friday. Maybe they can invite some of the guys from the 2020 champs to join them.

jalexander@scng.com