No team has ever failed to make the postseason after holding a lead of nine or more games in September, but Dustin Pedroia’s Red Sox are on the verge of doing just that, having lost 18 of their first 23 games this month. (Ray Stubblebine/Reuters)

A hundred-plus years of baseball history had proven one thing about pennant races: A nine-game lead in September is essentially unassailable. There have been epic collapses, colossal chokes and monumental meltdowns. But no team in history — not the infamous 1964 Philadelphia Phillies, not the 1978 Boston Red Sox, not the 1995 California Angels, not the 2007 New York Mets — has ever failed to make the postseason after holding a lead of nine or more games in September.

That fundamental truism, however, is being tested this week, in gruesome, highly public fashion: The 2011 Red Sox are in danger of completing the choke job to end all choke jobs. Their lead in the AL wild-card race, which stood at nine games on Sept. 3, was down to a game over the Tampa Bay Rays (and three over the Los Angeles Angels) by late Sunday, after the Red Sox salvaged a doubleheader split at Yankee Stadium with a 7-4, 14-inning win in a nightcap that lasted a grueling 5 hours 11 minues while the Rays beat the Toronto Blue Jays.

Suddenly, as the Red Sox prepare to open a season-ending, three-game series Monday night at Baltimore’s Camden Yards, they have run out of solutions — lineup changes and team meetings haven’t worked — and can only attempt to hold on for dear life and hope for the best. Such is the state of their decimated starting rotation that in Sunday’s doubleheader, they were forced to start Tim Wakefield and John Lackey, who between them had just two wins since the middle of August.

“It’s not a good feeling,” Red Sox second baseman Dustin Pedroia told reporters between games of Sunday’s doubleheader. “You’ve got a pit in your stomach.”

It is of little consolation to the Red Sox that they are not the only ones in danger of blowing a huge lead. In the NL wild-card race, the Atlanta Braves saw their lead over the surging St. Louis Cardinals reduced to one game after the Braves lost at Nationals Park to the Washington Nationals, while the Cardinals beat the Chicago Cubs. On the morning of Sept. 6, the Braves led the wild-card race by 81 / 2 games. They finish their season with three games at home against the NL East-champion Philadelphia Phillies; they face Phillies ace left-hander Cliff Lee on Monday.

“This was a very brutal loss for us,” Braves rookie first baseman Freddie Freeman told reporters after Sunday’s loss to the Nationals. “But we have to come back tomorrow.”

Meantime, entering Sunday’s nightcap, the Red Sox are6-18 in September, their worst mark for the month in 85 years. (The Braves were a comparatively robust 9-15.) Had Boston gone just 9-15 instead, it would already have clinched a playoff spot.

The scope of the Red Sox’s futility is staggering. Their starting pitchers had posted a cumulative 7.34 ERA this month entering Sunday, the worst in the majors by a full run. Four of their six wins during the month have come in games in which they scored 12 or more runs. When they have scored fewer than 12, they are2-18. They have found themselves down three or more runs in the first four innings on 14 occasions this month, including both ends of Sunday’s doubleheader.

At the start of the month, the Red Sox might have viewed the season-ending series in Baltimore — against an Orioles team on its way to its sixth straight 90-loss season — as little more than a low-pressure postseason tuneup. They could rest their everyday players, lift their starting pitchers after five or so stay-sharp innings, focus their attention on which bullpen arm or bench player to keep on the 25-man postseason roster.

But now, the Red Sox are in no position to coast, and even the Orioles look scary. Playing a September schedule in which nearly every game has been against a playoff team or playoff hopeful, the Orioles are 13-12 for the month, including successive series wins against the Angels, Rays and Red Sox during a stretch when all three were desperate for wins.

The two AL Division Series begin Friday (with the NL starting a day later), and both the Red Sox and Braves hope to have their No. 1 starters (Jon Lester and Tim Hudson, respectively) pitching those games. But if either team is still fighting to stay alive on Wednesday, they would have to sacrifice their aces in the regular season finale.

Ugly finishes don’t preclude playoff teams from winning it all. Should the Red Sox and/or Braves get in, they can take comfort in the recent examples of the 1997 Florida Marlins (12-17 in September, with seven losses in their final nine games), the 2000 Yankees (13-18 in September, with seven straight losses to end the season) and 2006 Cardinals (12-17 in September, with nine losses in their final 12 games) — all of whom went on to to win the World Series.

“I think when we get into the playoffs, whoever we play better watch out,’’ Red Sox first baseman Adrian Gonzalez told reporters on Saturday, “because we’re going to go in being the underdogs.”

Gonzalez is right about the “underdogs” part, because at this point no one would dare pick this Red Sox team — the consensus preseason pick as World Series champs — to win it all. But he might have been better served saying “if” the Red Sox get in, instead of “when.”