Even Gleyber Torres isn’t immune to the Yankees’ offensive malaise.

The second baseman, who had pummeled opposing pitchers throughout the postseason, finally struggled in the Yankees’ 8-3 loss Thursday to Houston in Game 4 of the ALCS.

Batting cleanup in a postseason game for the first time, Torres went hitless and made a pair of errors as the Yankees came to within a loss of their season being over.

He came up in the bottom of the first just when Aaron Boone would have envisioned when he penciled his name into the lineup Thursday.

With runners on first and second and one out against Zack Greinke, Torres swung at the first pitch and popped to first.

Torres popped to right for the second out in the third inning with Greinke on the mound and came up with a chance to turn the tide in the bottom of the fifth, with the Yankees trailing by two runs.

Greinke, who had been knocked out earlier in the inning after allowing a one-out single to DJ LeMahieu and a walk to Aaron Judge, was replaced by Ryan Pressly, who then walked Aaron Hicks to load the bases.

But Torres made a brief attempt at a Pressly pitch in the dirt. First base umpire Mark Carlson ruled Torres swung for the second out. Edwin Encarnacion whiffed to end the inning and the Yankees never got any closer.

Torres also struck out in the seventh and flied out to end the game in the ninth, as his playoff hitting streak came to an end.

His eighth-inning error on a Yordan Alvarez grounder with the infield in allowed Alex Bregman to score, and then Torres made a two-base error to lead off the top of the ninth on a Jose Altuve grounder.

Only a fine play by DJ LeMahieu in the second saved Torres from a third error.