For most of this season, the Houston Astros looked like one of the most unlikely success stories in recent MLB history. The team that averaged 108 losses a season from 2011 through 2013 — and considered last season’s 92-loss effort a big improvement — surged to the top of the AL West by the second weekend of the 2015 campaign. The Astros then held on to first place for a total of 139 days, maintaining a perch atop the division from mid-April all the way to mid-September, save for a two-week dalliance with second place in July.

Well, so much for all that. The Astros now trail the division-leading Rangers by three games with three to play. According to the FanGraphs playoffs odds, Houston now owns just a 1.4 percent chance of winning the West — compared to a peak of 90 percent in late August. However, the much scarier proposition is that the Astros are now fighting for their playoff lives. A seven-game winning streak by the Angels briefly lifted them above Houston in the race for the second wild-card berth, but after Mike Trout & Co. lost to Texas last night, the Astros have a one-game lead heading into the final weekend of the season.

Now, the Rangers and the Angels play each other three more times this weekend, which could help Houston’s cause, especially if Texas wins them all. But between the uncertainty surrounding that series, the Astros’ September struggles, their season-long nightmares on the road, a weekend series in Arizona, and the Twins still in the wild-card mix, nerves are frayed in Houston right now.

While the Astros remain the favorites for the final playoff spot — FanGraphs gives them a 74 percent chance of making the postseason, while the Angels are just north of 16 percent — what looked like a dream season could end both with better results than anyone expected on Opening Day and a heavy dose of bitter disappointment. But even if they do hold on for a wild-card berth, we still have to ask: What the hell happened?

♦♦♦

To start to wrap your head around Houston’s awful September, first consider this chart detailing the team’s pitching from last month:

September Total Worst Month in 2015? ERA 4.88 Yes FIP 4.44 Yes Opponents’ AVG .261 Yes Opponents’ OBP .323 Yes Opponents’ SLG .443 Yes Opponents’ HR/PA % 3.9 Yes Opponents’ BABIP .307 Yes Strand rate 69% Yes

Want to end up 11-16 in September? Start by making sure your pitchers have both their worst and their unluckiest month of the season.

The most painful part about this is that the Astros anticipated the possibility of pitching regression if they did nothing to address it. Houston’s third-most-used starting pitcher this season has been Lance McCullers, a wildly talented right-hander who’s nonetheless just a rookie and therefore needed his innings to be monitored. For a little while, fellow rookie Vincent Velasquez was also part of the rotation, and the same innings-limit concerns applied to him, too. Then, add the 46 starts that have been given to the sub-mediocre group of Scott Feldman, Roberto Hernandez, Brett Oberholtzer, Dan Straily, Asher Wojciechowski, Samuel Deduno, and Brad Peacock (collective ERA: 5.00), and for a team suddenly with clear and immediate playoff aspirations, reinforcements were needed.

In late July, Houston overhauled 40 percent of its rotation by acquiring two veteran starting pitchers, Scott Kazmir and Mike Fiers. Since arriving from Milwaukee, Fiers has been a bit erratic but also mostly effective, offsetting his 10 homers allowed in 62.1 innings with lots of strikeouts and a low hit rate, including an August no-hitter against the Dodgers. But if Houston fails to make the playoffs, a good chunk of the blame will fall on Kazmir.

Otto Greule Jr/Getty Images

A Houston native in the walk year of the two-year deal he signed with the moribund A’s, Kazmir landing with the Astros on July 23 surprised very few people in baseball. With Dallas Keuchel putting up Cy Young–contender numbers at the top of the rotation, Collin McHugh offering solid support in the no. 2 spot, and McCullers not slowing down much after his torrid first few starts, Kazmir, who’d posted a sparkling 2.38 ERA in 18 starts with Oakland, mostly needed to come in, soak up some innings, and be effective. Stardom wasn’t necessary.

However, competence was, and Kazmir hasn’t offered it. In 13 starts as an Astro, he’s given up 42 runs and 78 hits in 73.1 innings. Opponents are smashing 1.6 homers per nine innings against him during his time in Houston, and that would be second-worst among all qualified starting pitchers if prorated over the entire season. His 5.20 FIP as an Astro would be the worst fielding-independent mark among all qualified starters by a comfortable margin. Like many of his fellow Astros pitchers, Kazmir has especially struggled in September. In his first seven starts as an Astro, he posted a 2.64 ERA. In his six starts since, all in September: 6.52, with four unearned runs allowed to boot. That includes a six-run debacle Wednesday night in Seattle that Houston’s recently surging offense was able to overcome en route to a tight 7-6 victory.

Although he’s in a contract year and put up impressive numbers over the first half of the season, Kazmir’s cratering isn’t totally unexpected. This is the second straight season in which Kazmir’s hit a wall down the stretch: He posted a 2.37 ERA in his first 21 starts last season, and a 6.05 ERA in his last 10. Beyond the immediate consternation his struggles have caused, if the Astros do make the playoffs and then beat (presumably) the Yankees to advance to the ALDS this year, they’ll have to think long and hard about starting a pitcher with Kazmir’s checkered history. He tossed just 1.2 innings between the 2011 and 2012 seasons, toiled in indy ball to reignite interest from major league teams, then made an amazing comeback with the Indians and A’s. Yet, he remains someone who can’t seem to make it through a full big league season without both his velocity and results deteriorating.

Not that Kazmir deserves all of the blame — far from it. Entering September, Astros starting pitchers owned a 3.59 ERA, the second-best mark in the American League. But from September 7 through September 30, they delivered a brutal 4.92 ERA, allowing a major-league-high 26 homers during that span. Only the rookie McCullers, who was given a major league respite after being sent to the minors for a couple of weeks in August, avoided a September letdown:

April to August ERA September ERA Dallas Keuchel 2.24 3.78 Scott Kazmir 2.64 6.52 Collin McHugh 3.92 4.31 Mike Fiers 0.67 4.45 Lance McCullers 3.21 3.19

Yet, with more homers than any other team except the Blue Jays, the second-best defense in the AL (behind the Royals), and a bullpen that entered September with a 2.73 ERA (fourth-best in the majors), a starting pitching slump wouldn’t have been enough to torpedo the Astros’ season on its own.

Add in a bullpen slump, though, and that’ll do it. In September, Houston’s pen posted a 5.63 ERA, the worst mark in the majors over that span. In this case, the prevailing woes look more like bad luck than anything. For Astros relievers, the strikeout and walk rates remained virtually identical to their strong levels from earlier in the season. In fact, opponents also made contact less frequently and chased more pitches out of the zone than they did the rest of the year. But the Astros pen got hammered by terrible results on balls in play and a gigantic decline in strand rate.

April to August September BABIP .253 .349 Strand rate/LOB % 78% 63%

In case that wasn’t enough, their offense has also suffered some less obvious misfortune. In September, their already power-laden lineup turned on some extra juice, leading the majors in homers (44) and slugging percentage (.486). After a miserable first five months, Chris Carter has cranked six homers in his past nine games, while other complementary players like Colby Rasmus and Jake Marisnick have also put up impressive numbers. Those contributions, which helped the club to the third-best overall offense on a park-adjusted basis in September, might’ve been enough to offset the team’s pitching woes — if not for even more lousy luck. The Astros posted a low .258 batting average on balls in play with men on base in September — the second-lowest figure for any team that month, and way below Houston’s .301 mark the rest of the season.

Chris Covatta/Getty Images

♦♦♦

At the end of July, the playoffs seemed like a sure thing in Houston. The team was 58-46 and had just added two useful pitchers, plus Carlos Gomez, one of the best position players available at the trade deadline. Coming into the year, the team wasn’t supposed to contend, but the deadline moves were a clear sign of management realizing that it could — and you can see why they went for it.

If the Astros don’t end up making the playoffs or if they get knocked out in the wild-card game, it might seem more reasonable to look at this as an overachieving team — led by rookies Carlos Correa and McCullers — just scratching the surface of its potential rather than one that collapsed and blew a precious opportunity. After all, few people expected Houston to win this year, so aren’t the Astros ahead of schedule?

But it’s hard not to wonder if this was their chance to catch the division on a down year. After coming into the season as supposed World Series contenders, the Mariners were a total disappointment, as were the A’s, who are just one year removed from a playoff appearance. Despite the Angels’ late-season surge, they won’t come close to the 98 games they won last year. And although the Rangers are likely to win the division, they’ve once again been crushed by injuries, and their two aces, Yu Darvish and Cole Hamels, have yet to pitch in the rotation together. How often will all of those dominoes fall the right way for Houston? Plus, for all of their young talent, many of the Astros’ best prospects are now either on the major league roster or were dealt to other teams for win-now upgrades. Some of the youngsters promise to get even better, but windows can close as quickly as they open.

Of course, if the Astros can shake off this September swoon, squeak into the playoffs, then make some noise in October, we might forget that any of this ever happened.

Thanks to ESPN Stats & Info for research assistance.