HOUSTON — The warning signs came the night before when two heavily favored teams, the Los Angeles Dodgers and the Atlanta Braves, were each stunned in a deciding fifth game of a division series, losing in their home ballparks.

The Houston Astros had to be careful the same fate did not befall them on Thursday — only in their case, it would have been worse. The Astros had 107 regular-season wins, the most in baseball, and they also won the most home games, 60. A loss in the first round of the playoffs would have been devastating for a team with World Series aspirations.

“As a manager, both of those games represented the worst-case scenario for a manager,” said A.J. Hinch, the Astros manager. “When I went to bed last night I was quite aware that nothing was guaranteed coming into today, even though we had what I felt was the best team.”

They also had perhaps the best pitcher in Gerrit Cole. In another glittering pitching performance by the almost unbeatable right-hander — this one a two-hit gem — the Astros bucked the recent trend and pounded the Tampa Bay Rays, 6-1, in Game 5 of their American League division series.