The Boston Red Sox hadn’t even had time to stagger back to their lockers, at a minute past midnight, their 162nd game in the books, the sting of losing still as fresh as a gushing wound. There were still expletives to hurl and inanimate objects to destroy as they entered the visitors’ clubhouse at Oriole Park at Camden Yards. They thought they had just experienced the most excruciating feeling in baseball. And then they caught sight of the televisions.

Some 900 miles to the south, and perhaps two minutes after the jarring end of Boston’s own game, the Tampa Bay Rays secured a walk-off victory that gave them the American League wild card. There the Rays were on TV, dancing and bouncing and screaming. And here the Red Sox were, too exhausted and defeated to have much of any reaction. Someone quickly turned off the TVs.

When the Red Sox boarded their team plane a short while later, it headed not to Florida for what would have been a one-game play-in against the Rays on Thursday afternoon, and not to Texas for the start of the American League Division Series on Friday — but back to Boston, where the Red Sox are certain to face a suffocating wave of scrutiny in the face of the biggest September collapse in baseball history.

The season ended for the Red Sox with a pair of crushing blows: their own 4-3 loss to the Baltimore Orioles, in which closer Jonathan Papelbon blew a one-run, ninth-inning lead on Robert Andino’s RBI single, followed minutes later by the Rays’ 8-7 win in 12 innings over the New York Yankees — a finish the Red Sox said they witnessed as it occurred on their clubhouse TVs almost the instant they entered the room.

“Unbelievable, man,” Red Sox designated hitter David Ortiz said in a near-whisper after the media was let into the room. “Unbelievable.”

And what happened to the Red Sox was, literally, unbelievable. No team in history had ever blown a lead in September as big as the one the Red Sox did at their peak — nine games. The Red Sox pulled off that feat, losing the wild card to the Rays on the final day of the season, by going 7-20 for the month, by failing to win back-to-back games the entire month, by failing in pretty much every facet of the game during that stretch.

“[After] the mess we got ourselves into, we had to take care of business tonight,” Manager Terry Francona said. “And we didn’t.”

The last bit of their hope evaporated in Wednesday night’s ninth inning, with Papelbon, one of the most trusted closers in baseball, on the mound. He blew away the first two hitters of the inning, but gave up a double to the right-field corner by Chris Davis, then another to the right-center gap by Nolan Reimold. The one-run lead was gone. The game was tied.

The next hitter, Andino, hit a sinking liner to left. Red Sox left fielder Carl Crawford — whose struggles this season in the first year of a seven-year, $142 million contract came to symbolize Boston’s expensive bust of 2011 — charged hard to attempt a sliding catch, but the ball eluded his glove. He tried to recover and throw to the plate to preserve the tie, but Reimold scored the winning run easily.

“It was real close,” Crawford said of his catch attempt. “I knew with a man on second, he was going to score if it bounced, so I tried to come in and make a play on it. But I couldn’t do it.”

When Wednesday night’s game was halted by rain as it entered the bottom of the seventh inning, the Red Sox were in an enviable position. They held a slim one-run lead over the Orioles, with nine outs left to secure and their best bullpen arms available to get them. Even better, in Florida, the Rays were trailing by seven runs to the Yankees. But everything changed during that 86-minute rain delay.

As the Red Sox watched in their clubhouse, the Rays erased their seven-run deficit in the eighth and ninth innings, tying the game after being down to their final strike. The Rays’ tying run crossed the plate just as the Red Sox were being summoned back to the field for the resumption of play following the rain delay.

For the Red Sox, those final nine outs were harrowing from the start. After the delay, right-hander Alfredo Aceves, pitching in relief of ace lefty Jon Lester, immediately hit two of the first three Orioles he faced with high-and-tight fastballs, but escaped without surrendering the lead. In the top of eighth, the Red Sox had a runner thrown out at the plate with one out. In the bottom of the eighth, Orioles designated hitter Vladimir Guerrero and catcher Matt Wieters each hit towering fly balls off set-up man Daniel Bard that died just shy of the wall.

In the top of the ninth, the Red Sox got an out call reversed at first base, leading to a bases-loaded, one-out threat that died when catcher Ryan Lavarnway grounded into a double-play.

And finally, in the bottom of the ninth, Papelbon gave up three straight hits with two outs. It was a microcosm of Boston’s season — everything was great until suddenly, at the very end, it was a disaster.

When September dawned, the Red Sox had the best record in the AL. They were 31 games above .500 (83-52), led the Yankees by 1 1 / 2 games in the AL East and the Rays by nine games for the wild card. The website, which calculates teams’ playoff odds by running millions of computer simulations of the seasons, had them at a 99.4 percent lock to make the postseason.

In the 0.6 percent that remained, there was nonetheless just enough room for the unthinkable, for an ending no one could predicted a month ago, for a very good team to pull off the most spectacular September implosion baseball has ever seen.